Sujet : Re: technology discussion → does the world need a "new" C ?
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 13. Jul 2024, 10:46:08
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6tid1$3hc2e$2@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
User-Agent : Mozilla Thunderbird
On 12/07/2024 20:32, bart wrote:
On 12/07/2024 19:13, bart wrote:
On 12/07/2024 13:36, David Brown wrote:
>
One person's private sort-of-C compiler is of no more relevance to the C community than one person's private language. You are welcome to make as many non-conforming changes to your own tools as you like, but they do not make a difference to C. No one else will ever use your tool, so no one else will ever care about any incompatible changes you make to it. If /you/ are happier having such changes in your tools, then that is great for you.
>
Jesus, you just can't resist putting the boot in at every opportunity and being incredibly patronising, can you?
>
I made the tweak to see how hard it would be to detect value-arrays declared in parameter list (it was very easy), and what the consequences would be on existing code (significant).
>
The example I posted showed a type (const char* x[]) where there was no advantage to having that value array notation. Using 'const char**' would be a more accurate description of the actual parameter type.
Incidentally if sizeof(x) is used, gcc will about it if using 'char* x[]', and not with 'char** x'.
I wonder why, since after all EVERYBODY who uses C understands what they are doing.
Everybody makes mistakes sometimes, no matter how good an understanding they have.
And many people have already agreed with you that this is a point in C which people misunderstand. You've worked with C for decades and demonstrate a considerable level of misunderstanding. I have said - and I stand by it - that the rules of C arrays are relatively simple and straightforward, and if you learn the language properly you will get them right. But I don't claim that everyone who programs in C, even all those that have done so for a long time, actually /has/ learned this properly. There are plenty of C references, books, courses, teachers, etc., who get it wrong too, and pass on their misunderstanding to others.
That is why people here are arguing with you. It's not because we /like/ every aspect of C, or think that the way C is defined here is better than alternatives (including some of your ideas). It is because C is the way C is, and people who want to use the language need to learn how it works, without being subjected to a barrage of misinformation and muddled thoughts from someone who is determined to make things as difficult as possible for people learning C.
I get that you hate C. What I don't get is why you feel the need to harm programmers learning C.