I guess what I would want is to be able to have a fat pointer to a multidimensional array, like I can do in Fortran, NumPy, etc. Why is the 1D case special, here?
My other questions are how do you create one of these fat pointers, how do you get the length, etc. This sounds to me like VLAs, but with a bigger change to the language, but unable to handle multidimensional arrays. VLAs, for all their faults, at least fit into the language for users well enough that people accidentally use them all the time (not necessarily a good thing).
Re:Checked C
by WalterBright on Wednesday December 21, 2022 @07:42PM
(#34088298)
> a fat pointer to a multidimensional array
T[3][4][..] a;
> length a.length
VLAs had a poor cost/benefit because they're just too awkward to use. 20 years experience with D shows that the [] syntax knocks it out of the park.
Any combination of static/fat arrays can be made for multidimensionality. For example,
etc.