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

Hugo Beauzée-Luyssen beauze.h at gmail.com
Mon Nov 28 15:25:01 CET 2011


On Fri, Nov 25, 2011 at 6:01 PM, Christopher Mueller
<Christopher.Mueller at itec.uni-klu.ac.at> wrote:
> 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.
>

I'll have to correct myself, try{} has some overhead, but it should be
negligible.

>> - 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.
>

If there's no objection, I'd like to do this in the next days.

> BR
> Chris
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>



-- 
Hugo Beauzée-Luyssen



More information about the vlc-devel mailing list