[vlc-devel] [Patches] Dash: mostly cosmetics

Christopher Mueller Christopher.Mueller at itec.uni-klu.ac.at
Fri Nov 25 18:01:56 CET 2011


Am 25.11.2011 02:53, schrieb Hugo Beauzée-Luyssen:
> 2011/11/24 Rémi Denis-Courmont <remi at remlab.net>:
>> 0011: I don't see the point. The code becomes harder to read. I 
>> think we can
>> trust the register allocators from compilers nowadays.
>>
>> 0012: OK but does not apply without previous patches.
>>
>> 0013, 0014, 0015, 0016: merged.
>>
>> 0017: cannot comment.
>>
>
> I have to agree on patch 11.
> About patch 10, I have a few reason to get rid of the exceptions :
> - On some platforms, exceptions are deactivated
> - They are slower than a return value to indicate an error. And in
> this case, the exception or the return value doesn't change anything
> to the code itself.

Yes but slowness is not a point for that exception because it is only 
thrown once per session.

> - Exceptions should (at least I think) be user for something that
> really is exceptionnal. The end of the file is something that is
> likely to happen

I like them because from my point of view they increase the 
readability.

>
> And as a personnal point of view, I find the code easier to read once
> exceptions are removed, but that's my tastes :)

What do you think about returning an enum state with states like EOF , 
RUNNING and passing the chunk per parameter? Then we would not need the 
exception and it would not decrease readability.

BR
Chris





More information about the vlc-devel mailing list