Deutsch English Français Italiano |
<vjcebq$1ka5o$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:24:25 +0100 Organization: A noiseless patient Spider Lines: 117 Message-ID: <vjcebq$1ka5o$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> <vjasuj$17uod$1@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:24:26 +0100 (CET) Injection-Info: dont-email.me; posting-host="b6e3a9773eab02572ec7dbc796f3695a"; logging-data="1714360"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19iFZVx9g9tDl8ow4krsvlV" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:UJpJiy4nmj06ke69yYy+dppw2o8= X-Enigmail-Draft-Status: N1110 In-Reply-To: <vjasuj$17uod$1@dont-email.me> Bytes: 6328 On 11.12.2024 03:21, bart wrote: > On 09/12/2024 18:46, Janis Papanagnou wrote: > >> An unambiguous grammar is something quite essential; how would you >> parse code if it were ambiguous? > > You can easily parse a language in an ambiguous syntax. [...] Sure; I recall Fortran had such an ambiguity, I think it was in context of FOR loops (something with the assignment and commas, IIRC). - Whether it's "easily [to] parse" is arguable, though, and certainly depends. - But I don't recall to have seen scary things like that in any other language I had to do with. Experienced language developers wouldn't define an ambiguous syntax in the first place. So what do you think your statement contributes to desire to have an "unambiguous syntax"? I mean, if you get confused by an unambiguous syntaxes already, what do you think happens with people if they have to program in or understand an ambiguous language! > >> You postulate it as if the grammar were convoluted; > > My opinion is that it is. Especially its propensity for using > long-winded production terms that look confusingly similar. (Would it > have killed somebody to make the names more distinct?) (I won't comment on your opinion.) With respect to distinctness of names I thought we had already exchanged some words - remember my 'while' and 'until' samples from Pascal (that somehow offended you)? Concerning "C"; I don't see why you shouldn't name a "positive" conditioned control construct consistently(!) as 'while' whether it controls a loop entry or a loop exit, and to name a "negative" conditioned control construct consistently(!) as 'until'. It's beyond me why one wants to replace a semantically consistent set like 'while' positive-case 'do' ... 'until' negative-case 'do' ... 'do' ... 'while' positive-case 'do' ... 'until' negative-case by, say, 'pre_while' positive-case 'do' ... 'pre_until' negative-case 'do' ... 'do' ... 'post_while' positive-case 'do' ... 'post_until' negative-case (Feel free to find better names than 'pre_xxx' and 'post_xxx'; it wouldn't change the "semantical consistency" argument.) > >>> So you're a parser and you see this: >>> >>> do ... while >>> >>> How do you know whether that 'while' starts a new nested loop or >>> terminates this one? >> >> Because there's the '...' in between that answers that question. > > Oh, I see. That answers everything! Including having a '...' that > includes statements starting with 'while'. Yes, the "syntax" is not only an isolated symbol. - Please keep my suggestion in mind to consider learning about formal languages and grammars. (I think for a compiler writer it should be a given.) If you look at symbols like a tokenizer you won't understand what any programmer needs to know to understand a language; (besides other things) the structure! > [...] > > My opinion about this feature remains the same, that it was a poor > design choice. One of dozens of such choices. An unambiguous grammar > does not by itself make for a good syntax. No one said it would. > > You however seem utterly incapable of criticising C. I already said that 98% of your imputations are certainly wrong and you should just stop that; even if you have no argument, better just shut up instead. - In this case, though, there wouldn't even have been the need for you to make imputations; my various criticisms on the language "C" is quite good documented in this newsgroup. I already said that I had a lot of criticism with various languages that I'm programming with, but, as oppose to you, I don't complain constantly and repeatedly about that. You could also have observed that many folks here (also repeatedly) told you that they know about the [real] deficiencies of the "C" language. > Could you write an > article all about its quirks and gotchas and flaws? I doubt it. Of course I could. I could even write articles about pros and cons of every language I've made experiences with; on a principal level (for example design) and on a practical level. (But why should I?) The problem(s) that you have is (are) far beyond what I'd consider to be a sensible criticism. But I accept that you have own opinions on what's a problem [to you]. Janis > [...]