Deutsch   English   Français   Italiano  
<864j39hro2.fsf@linuxsc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: question about linker
Date: Thu, 12 Dec 2024 07:01:01 -0800
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <864j39hro2.fsf@linuxsc.com>
References: <vi54e9$3ie0o$1@dont-email.me> <vicque$15ium$2@dont-email.me> <vid110$16hte$1@dont-email.me> <vifcll$1q9rj$1@dont-email.me> <vifiib$1s07p$1@dont-email.me> <87ldwx10gv.fsf@bsb.me.uk> <vimtt4$27vv$1@dont-email.me> <86ser1kgp5.fsf@linuxsc.com> <vit69t$1qfgg$1@dont-email.me> <87ldwtzlc0.fsf@nosuchdomain.example.com> <vitjgg$1tukq$2@dont-email.me> <vj1bss$325uo$1@dont-email.me> <vj1h4i$335q1$2@dont-email.me> <vj1mhi$34p7h$1@dont-email.me> <vj1prj$35je4$1@dont-email.me> <vj7dup$he7i$1@dont-email.me> <slrnvlik4j.ns4.ike@iceland.freeshell.org> <vjcens$1kcos$1@dont-email.me> <vjcfnc$1kfcq$1@dont-email.me> <vjcftu$1kk6l$1@dont-email.me> <vjchk5$1kmm9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Thu, 12 Dec 2024 16:01:02 +0100 (CET)
Injection-Info: dont-email.me; posting-host="4d4e784de64121797bdb6fbf35a5252c";
	logging-data="2291145"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX183U5Bv/GcOKRXkIFpfq5ZGiXAvLB5OvOM="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:lb+yj6YQVSTKXrDyTYbHrcUhTCQ=
	sha1:sjUrOQqatquebVDl23SzxlaDEaA=
Bytes: 3102

bart <bc@freeuk.com> writes:

> On 11/12/2024 16:51, Janis Papanagnou wrote:
>
>> On 11.12.2024 17:47, David Brown wrote:
>>
>>> On 11/12/2024 17:30, Janis Papanagnou wrote:
>>>
>>>> On 11.12.2024 09:43, Ike Naar wrote:
>>>>
>>>>> On 2024-12-09, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>>>>>
>>>>>> An unambiguous grammar is something quite essential;  how would you
>>>>>> parse code if it were ambiguous?
>>>>>
>>>>> Here's an ambiguity in the C grammar:
>>>>>
>>>>> [...]
>>>>>
>>>>> The following selection-statement is grammatically ambiguous:
>>>>>
>>>>>       if (E1) if (E2) S1 else S2
>>>>
>>>> Yes, the dangling else is a common ambiguity in many programming
>>>> languages.
>>>>
>>>> That's why I prefer languages with syntaxes like in Algol 68 or
>>>> Eiffel (for example).
>>>
>>> It is easy to avoid in a C-like language - simply require braces on "if"
>>> statements, or at the very least, require them when there is an "else"
>>> clause.
>>
>> Yes, sure.  But, I can't help, it smells like a workaround.
>>
>>> Most C coding standards and style guides make that requirement
>>> - not because the C compiler sees it as ambiguous, but because humans
>>> often do.  (Or they misinterpret it.)
>>
>> Yes, true.  (We had that in our standards, too.)
>
> So here you finally acknowledge there may be ambiguity from a human
> perspective.
>
> But when I try to make that very point, it's me [...]

Duo cum faciunt idem, non est idem.

- The ancient playwright Terence