logoalt Hacker News

randomNumber7 • today at 3:41 PM • 2 replies • view on HN

As far as I know many C programmers think the addition of variable length arrays in C99 was a mistake. What would be the downside of this approach?


Replies

pjmlp • today at 3:42 PM

So much so, that it was made optional annex in C11, while Google paid to remove all their use from the Linux kernel.

uecker • today at 3:48 PM

I do not get the connection with a VLA in this context, but if you need a VLA, by all means use it. It is basically always better than the alternative.

➕ show 1 reply