[vlc-devel] [Patches] Dash: mostly cosmetics
beauze.h at gmail.com
Fri Nov 25 18:31:34 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
>>> 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.
That's a good point
>> - 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.
Again, this is about tastes! However, this is often true. Anyway, I
pretty much agree with this article :
>> 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.
That could be a way indeed!
Since I'm writting about dash, do you have an opinion about relocating
the read/peek method into the Chunk themselves ?
This seems more natural to read from a chunk than asking the Network
manager to read from a connection identified by a chunk.
This is something I was thinking about, but I have to read the code a
bit more to be sure it's doable.
More information about the vlc-devel