Conversation

Björkus "No time_t to Die" Dorkus

This is closing in 5 days. Add your response to the mix as soon as possible, or risk never being heard in the Official Vote™!!

https://thephd.dev/the-big-array-size-survey-for-c

7
7
0

@thephd@pony.social your survey doesn't accept any of my email addresses

1
0
0

@linear Put a fake one in, I guess. I won't be using them for any real purpose except post at you if it seems your response is broken/incomplete.

0
0
0

@thephd i didn't fill the survey but I vote for countof :-) i think this fits best with sizeof

1
0
0

@jduck @thephd for my own language i picked countof in 2016 and have not regretted it

1
0
0

@lritter @jduck @thephd Right. I don't agree that "count" conveys the idea of an algorithm rather than an operation. A couple of major compilers have already added a "counted_by" attribute, which does not refer to an algorithm…

0
0
0

@thephd More C standard stuff should be put to a popular vote. Just for the sake of getting a better idea of what people in the wild are actually looking for.
With Python that seems to have become a big problem where the language developers were too deep into their own circles, extremly disconnected from the average Python dev that is not gonna respond to a core dev mailing list survery, let alone be aware of their work to begin with.

1
0
0

@timonsku I am running the survey to gather data. Whether the Committee listens or values that data is another story.

0
0
0

@thephd lengthof() is obviously the right name for this feature, as for requiring a header that seems fine

0
0
0

(* chuckles *) I'm in danger,

0
0
0
@thephd good to see a survey but I guess I'll be using ARRAY_SIZE forever. And it was not in the list while the absolutely not awkward to type "nelemsof" had two variants.
1
0
0

@kdave We're naming an operator, not providing a macro. ARRAY_SIZE is a macro, and it has all the usual macro problems.

1
0
0

@thephd I'm quite surprised by the assertion that `nelements` could easily become a keyword because it shows up nowhere that matters. https://codesearch.debian.net/search?q=%5Cbnelements%5Cb&literal=0&perpkg=1 seems to very much contradict this.

1
0
0

@cjwatson The keyword would be nlementsof, which does show up nowhere anyone cares about:

https://codesearch.debian.net/search?q=%5Cbnelementsof%5Cb&literal=0

0
0
0
@thephd Operator _Array_size, macro is optional
0
0
1