Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: technology discussion =?utf-8?Q?=E2=86=92?= does the world need a "new" C ? Date: Sat, 06 Jul 2024 20:04:17 -0700 Organization: A noiseless patient Spider Lines: 37 Message-ID: <86msmtc37y.fsf@linuxsc.com> References: <871q48w98e.fsf@nosuchdomain.example.com> <87plrsultu.fsf@bsb.me.uk> <87ed87v4wi.fsf@bsb.me.uk> <87v81ita77.fsf@bsb.me.uk> <87sewmt7da.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 07 Jul 2024 05:04:18 +0200 (CEST) Injection-Info: dont-email.me; posting-host="940a3321ebe7e91666808b6f59645346"; logging-data="199703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FARNEQD4sqnhCP6tQmvsjR4cyWV+vKQY=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:wV4Lr4Dl/FcASTout6J2g6xAAyg= sha1:4uRkAG+pF728X3mwpGJOCOnJD4w= Xref: csiph.com comp.lang.c:386845 Keith Thompson writes: > Ben Bacarisse writes: > >> BGB 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.