Sujet : Re: technology discussion → does the world need a "new" C ?
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 12. Jul 2024, 12:34:17
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6r4bp$308g3$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
User-Agent : Mozilla Thunderbird
On 11/07/2024 19:25, bart wrote:
On 11/07/2024 16:58, David Brown wrote:
...
You've mentioned very clearly that your understanding of C is a mess.
C itself is quite simple here,
Not it isn't. The fact that I can do this:
void F(vector a) {} // typedef byte vector[100];
and get the type of 'a' as 'byte*', sizeof(a) as 8, sizeof(*a) as 1, but
sizeof(vector) as 100, suggests all sorts of shenanigans.
No, just one shenanigan. It suggests that when a function parameter is
declared as an array of 'type', that it is treated as a declaration of a
pointer to that type.
Every fact that you listed above follows from this rule which is very
explicitly stated in the C standard and any C textbook, and which is
simple enough that most C newbies figure it out fairly quickly. It has
already been explained to you hundreds of times over the past decade or
so - but has apparently never actually gotten into your brain
and the rules are not hard to understand.
Ha ha ha! Of course you would say that.
Keep in mind that you've proven repeatedly that your ability to
understand even the simplest features of C is quite negligible. The fact
that you can't understand it proves almost nothing about how hard it is
for most people to understand.