Re: [PATCH] Various pages: SYNOPSIS: Use VLA syntax in function parameters

Alejandro Colomar
2022-09-03T15:08:22Z

[-- Attachment #1.1: Type: text/plain, Size: 1460 bytes --]

Hi Ingo,

On 9/3/22 15:29, Ingo Schwarze wrote:
> the only point i strongly care about is this one:
>
> Manual pages should not use
> * non-standard syntax
> * non-portable syntax
> * ambiguous syntax (i.e. syntax that might have different meanings
> with different compilers or in different contexts)
> * syntax that might be invalid or dangerous with some widely
> used compiler collections like GCC or LLVM

The first two are good guidelines, but not strict IMHO if there's a good
reason.

The third and fourth are a strong requirements.

For now I won't be applying this patch.

>
> Regarding the discussions about standardization and extensions,
> all proposals i have seen look seriously ugly and awkward to me,
> and i'm not yet convinced such ugliness is sufficiently offset by
> the relatively minor benefit that is apparent to me right now.

I hope we come up with something not ugly from that discussion.

The static analysis / compiler warning capabilities of using VLA syntax
seem strong reasons to me. They help avoid stupid bugs, even for
careless programmers (well, only if those careless programmers care just
enough to enable -Wall, and then to read the warnings). Not something
that will fix an incorrect algorithm, but can stop some typos, or other
stupid mistakes that we all do from time to time.

Cheers,

Alex

--
Alejandro Colomar