On Tuesday, 22 December 2020 at 14:15:12 UTC, Mike Parker wrote:
[][4]Foo is completely backwards from and inconsistent with the pointer declaration syntax. We shouldn't want to intentionally introduce inconsistencies.
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'
On Tuesday, 22 December 2020 at 14:35:30 UTC, ag0aep6g wrote:
But now we're no longer C-like, I guess.
I think it'd still be quite C-like, same concepts samilar usage. You're not using 'int foo[]' syntax anymore anyhow.