Sujet : Re: question about linker
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 05. Dec 2024, 12:15:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vis20r$1io92$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/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 05.12.2024 01:19, Keith Thompson wrote:
Bart <bc@freeuk.com> writes:
>
Let's put it this way: if somebody asked me what the rule was, I
wouldn't be able to tell them.
Probably because there's no single rule. As I wrote, "{" and "}"
are used in different contexts with different meanings. [...]
The context in the post was not about the many places where the
braces are used in "C" but was concerning only a very specific
case; mainly an empty statement (terminated by a semicolon) and
an empty block (an empty compound statement). - If that already
confuses him you can imagine what you do when pointing out that
there's yet more uses of braces. :-)
[...]
>
Consistency? I posted a bit of Algol68 the other day; each function
definition needed a semicolon, to separate it from the next.
(In Algol 68 not specifically only function definitions. "Things"
just need separation "to tell them apart". That's quite typical
for [programming] languages.)
C is not Algol68. In C, the syntax of a function definition is such
that they can be appended without ambiguity. Requiring a semicolon
after each definition would not help anything. [...]
Any why would one want to introduce an inconsistency here? The
"C" syntax may be disliked but at least it makes sense [here].
Janis