| Deutsch English Français Italiano |
|
<vjcfls$1ki9v$1@dont-email.me> 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: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.lang.c Subject: Re: question about linker Date: Wed, 11 Dec 2024 17:46:50 +0100 Organization: A noiseless patient Spider Lines: 25 Message-ID: <vjcfls$1ki9v$1@dont-email.me> References: <vi54e9$3ie0o$1@dont-email.me> <87plmfu2ub.fsf@nosuchdomain.example.com> <vi9jk4$gse4$1@dont-email.me> <vi9kng$gn4c$1@dont-email.me> <87frnbt9jn.fsf@nosuchdomain.example.com> <viaqh0$nm7q$1@dont-email.me> <877c8nt255.fsf@nosuchdomain.example.com> <viasv4$nm7q$2@dont-email.me> <vibr1l$vvjf$1@dont-email.me> <vic73f$1205f$1@dont-email.me> <20241129142810.00007920@yahoo.com> <vicfra$13nl4$1@dont-email.me> <20241129161517.000010b8@yahoo.com> <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> <vjcb2s$1jcad$4@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 11 Dec 2024 17:46:52 +0100 (CET) Injection-Info: dont-email.me; posting-host="e2c59b9ad4b5a7b6fad9f6e36ab1221a"; logging-data="1722687"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yAzXB7q0fVIQu3syje7jp" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:O/xL0gU5EbRftSbmd79z33xG0uc= X-Enigmail-Draft-Status: N1110 In-Reply-To: <vjcb2s$1jcad$4@dont-email.me> Bytes: 3188 On 11.12.2024 16:28, David Brown 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; [...] >> >> [ dangling-else sample ] > > Given that the resolution is in the "semantics" section rather than the > "syntax" section, it might seem like a grammatical ambiguity. But I > don't think it is, technically - the syntax rules say that the set of > tokens making up "if (E1) if (E2) S1 else S2" are valid syntax. It is > up to the semantics to determine what the code will do here. (And the > semantics are unambiguous.) I'm a bit ambivalent about that. - Yes, technically it's syntax, it's syntactically probably correct, and it has a semantical ambiguity that needs to be resolved. All languages with the dangling-else property do resolve that. But the syntax could have been defined in a way that such that a dangling else cannot appear in the first place. (Not in "C" and descendant languages, of course; that ship has sailed.) - Personally I thus appreciate languages with if-then-elif-else-fi sorts of syntaxes. Janis