Sujet : Re: technology discussion → does the world need a "new" C ?
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 07. Jul 2024, 04:04:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86msmtc37y.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Keith Thompson <Keith.S.Thompson+
u@gmail.com> writes:
Ben Bacarisse <ben@bsb.me.uk> writes:
>
BGB <cr88192@gmail.com> writes:
>
On 7/5/2024 5:40 PM, Ben Bacarisse wrote:
>
[...]
>
Whole language design is still a hypothetical at this point anyways (and my
actual compiler does support multidimensional arrays).
>
Ah. I think that when you've written most of it, you will see that
ruling out arrays of arrays will have not simplifying effect.
>
Indeed. I believe (based on no direct experience) that you could write
a fully conforming C compiler without even thinking about
multidimensional arrays, and if you get the array code right,
multidimensional arrays will just work.
There are some corner cases that seem to require some thinking.
For example,
extern int x[];
extern int y[][10];
are both alright, but
extern int z[10][];
is not. There are similar cases with function parameters, and
maybe with VLAs. Also, possibly, flexible array members (do I
have that name right?).
Not saying the amount of thinking needed is overpowering, but
it does seem to be greater than zero.