Sujet : Re: do { quit; } else { }
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 12. Apr 2025, 02:27:21
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtcfhp$325g6$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
User-Agent : Mozilla Thunderbird
On 12/04/2025 00:59, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 11/04/2025 22:36, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
[...]
Rubbish. Everyone finds C declaration syntax a nightmare.
Rubbish. I find C declaration syntax annoying, not a "nightmare".
>
Annoying would be having to get letter case or punctuation just right.
[...]
So, yeah, a 'nightmare' is more apt than 'annoying'.
Bart, bart, bart.
You made a false statement about how *everyone* feels about
C's declaration syntax.
So what would be a true statement? That everyone finds it at least midly annoying?
C type syntax is famous for being difficult and confusing; I think most will agree about that. Even the creators said so.
This was the discussion:
BC:
> Humans have to parse it too. C must be the only non-esoteric language where you need to use third-party tools (CDECL etc) to make sense of type-declarations. Either that or follow complex spirular algorithms to [decode] them.
DB:
I have never heard of anyone other than you who views cdecl as a necessity.
So, is that last statement true or not? I didn't say it was a necessity, but that you need to use such tools or special methods to understand them. And clearly, that would be the more complicated ones; people can usually cope with 'int'.
I replied to one sweeping statement with another.
We all know that you consider it to be
a nightmare. I don't think I've ever said or implied that you
shouldn't feel that way. You think everyone *should* find it
a nightmare? Fine.
You cannot possibly be so deluded that you think everyone feels
the same way as you do, and we're all lying about it.
There are plenty of resources like this about:
http://www.unixwiz.net/techtips/reading-cdecl.htmlhttps://news.ycombinator.com/item?id=42564861Why are they even necessary?
(That last link includes this comment: "If you need a program to help you read C programs, that suggests a serious flaw in C." I have to give quotes from others because everybody here thinks it is only me.
Here's a couple from Ritchie and Stroustrop:
https://dev.to/pauljlucas/musings-on-c-c-declarations-169o)
You want to be treated better? Stop making deeply silly statements.
DB was making light of the type syntax issue and pretty much dismissed it out of hand. How should I have responded?
Not that it would cut any ice with him. Nothing is ever that complicated or too onerous or too slow or too over the top or too badly designed or ...
I suggest also that you stop taking throwaway comments too literally. Yet, there is probably more truth in my remark than in David's.
You might also consider that while many features of C have been copied, I don't know of any language that has copied its type syntax.
I wonder why? Do you think the designers had an opinion about it closer to mine, or to David Brown's?