On Tuesday, 22 December 2020 at 15:24:04 UTC, Rekel wrote:
The way C syntax handles pointers isn't very consistent to begin with imo. It's strange & and * are prepended to pointer variables for example, while indexing is postpended. Leads to stuff like;
(*array_of_pointers_to_arrays[2])[1]
vs
array_of_pointers_to_arrays[2]*[1]

and

(*array_of_pointers[1]).x'
vs
'array_of_pointers[1]*.x'

Don't take that as a defence of changing pointer syntax by the way, just noting I think the argument pointers and arrays should be defined using a similar syntax is not consistent when thinking about indexing & dereferencing.

Besides, I think '[4]foo* foos;' is quite clear.
"array of foo pointers" seems very natural to me.

Reply via email to