Path: ...!npeer.as286.net!npeer-ng0.as286.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Brown Newsgroups: comp.lang.c Subject: =?UTF-8?Q?Re=3A_technology_discussion_=E2=86=92_does_the_world_need?= =?UTF-8?B?IGEgIm5ldyIgQyA/?= Date: Fri, 12 Jul 2024 08:00:30 +0200 Organization: A noiseless patient Spider Lines: 40 Message-ID: References: <87h6d2uox5.fsf@nosuchdomain.example.com> <20240707164747.258@kylheku.com> <877cdur1z9.fsf@bsb.me.uk> <871q42qy33.fsf@bsb.me.uk> <87ed82p28y.fsf@bsb.me.uk> <87r0c1nzjj.fsf@bsb.me.uk> <87ikxconq4.fsf@bsb.me.uk> <20240711115418.00001cdf@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 12 Jul 2024 08:00:30 +0200 (CEST) Injection-Info: dont-email.me; posting-host="0d63f29bdb823407c5eda4702e8b85d8"; logging-data="3054375"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oO5dkvcHANvOwzI6+y6rnZ5UVMMtLsbs=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:NFiBHHhT6xzN2PHPpaUqhtRf06Q= Content-Language: en-GB In-Reply-To: Bytes: 3515 On 11/07/2024 19:25, bart wrote: > On 11/07/2024 16:58, David Brown wrote: >> On 11/07/2024 13:22, bart wrote: > >>> If the original array has type T[N], then the T is passed, but the N >>> is lost. The [] is also lost:; it turns into *. But in C, that >>> doesn't matter too much; it can still index that object! >> > >>> (Here I'm talking about info attached to the parameter name; the type >>> itself may still have that N. Have I mentioned that C is mess?) >> >> 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. > >> and the rules are not hard to understand. > > Ha ha ha! Of course you would say that. > Well, yes, I /did/ say that. The rules for C are not the way I would have preferred, but they are straightforward to learn and consistent. All you have to do is listen to what people tell you, read reliable information (such as the standards), and stop insisting that your confusing misunderstandings are correct. I can understand when someone new to C gets mixed up about how arrays work. I don't understand how someone can remain so stubbornly confused when they have been told how C /actually/ works.