C2y introduces a new operator to compute the size in elements of array-like structures, addressing a long-standing demand. The operator, presented through a macro named SIZE_KEYWORD, allows users to determine the number of elements in arrays directly in the C language. The community is invited to participate in a survey to decide the final name and usage pattern of this operator, with options including lenof, lengthof, countof, nelemsof, nelementsof, and extentof.

14m read timeFrom thephd.dev
Post cover image
Table of contents
The OperatorThe ChoicesUsage PatternKeyword SpellingsThe Survey

Sort: