[vlc-devel] [PATCH 09/12] network: io: Remove VLA usages

Thomas Guillem thomas at gllm.fr
Fri Dec 11 16:28:27 CET 2020



On Fri, Dec 11, 2020, at 16:18, Pierre Ynard via vlc-devel wrote:
> > That sounds like maintaining 2 different versions of the same code. 
> > That's not a good idea IMO.
> 
> That's more or less what we already do in plenty of places. It certainly
> sounds like a decent idea to me, and it sounds feasible to do it with
> just a few lines within #ifdef's; but again, the merits would be on a
> case-by-case basis. It's up to the developer writing the patch to come
> up with the best implementation of this in each case, one that looks as
> little as possible like maintaining two different versions of the same
> code; I'm all for the most elegant solutions.
> 
> On the contrary, banning VLAs would sound like letting the project be
> driven by the lowest common denominator, and I think that would be a
> worse idea.
> 
> Come on, we've already eliminated some of the less relevant uses of
> VLAs, it can't be that hard to agree on which are actually beneficial to
> the code and then work out a few fallbacks for them.

I agree with Steve. I want to minimize #ifdef usage and double implementation.

For me, the main advantage of VLA is code simplicity. If you have to put ifdef and implement something twice, you kill the simplicity.

> 
> -- 
> Pierre Ynard
> "Une âme dans un corps, c'est comme un dessin sur une feuille de papier."
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list