Hi Joseph,

On Wed, Oct 09, 2024 at 09:11:52PM GMT, Joseph Myers wrote:
> On Wed, 9 Oct 2024, Alejandro Colomar wrote:
> 
> > Every little bit adds up.  Documentation is simpler if there is naming
> > consistency.  We have SYNOPSISes in the man pages, and they're up front,
> > because they constitute an important part of the documentation.
> 
> We also have a convention for future standard C interfaces to put the 
> length before the pointer so that a VLA parameter declaration can be used 
> that makes very clear the intent for how many elements the array has, 
> which seems much better for that purpose than relying on the name of a 
> parameter.

Just as a confirmation of what I already said: none of the arguments
convince me.  They seem mitigations to the damage that overloading the
term length can do.

I stand on my proposal of either __nelementsof__(), __countof__() (with
no preference), any derivative of those, or almost anything that doesn't
derive from "length" (well, I also veto "dimension", "extent", and
"range", for different reasons, but anything else is fair game).

If you want _Lengthof, please sed(1) it yourself and sign the patch
below my signature.  I don't think you (or myself) can convince me of
changing my mind, so it's up to you to decide what you want to do.

I think it would be good to have this in GCC 15, so if you're convinced
of _Lengthof(), please go ahead already.  I don't think delaying this
further will change the mind of any of us.


Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature

Reply via email to