From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c733905936c6b6b0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.129.169 with SMTP id nx9mr10223991pbb.2.1334596275408; Mon, 16 Apr 2012 10:11:15 -0700 (PDT) Path: r9ni63506pbh.0!nntp.google.com!news2.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.kamp.net!newsfeed.kamp.net!87.79.20.101.MISMATCH!newsreader4.netcologne.de!news.netcologne.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 16 Apr 2012 19:11:13 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [OT] interesting reason why a language is considered good References: <8603135.951.1334573001928.JavaMail.geo-discussion-forums@vbbdy9> <4f8c06f5$0$7617$9b4e6d93@newsspool1.arcor-online.net> <14veb9cpamoda.ck9fbsd5m9m$.dlg@40tude.net> <4f8c3431$0$7627$9b4e6d93@newsspool1.arcor-online.net> In-Reply-To: Message-ID: <4f8c52b2$0$7627$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 16 Apr 2012 19:11:14 CEST NNTP-Posting-Host: 059e156f.newsspool1.arcor-online.net X-Trace: DXC=bM5R]^JZLh>_cHTX3j]i1\bD]j7:M_ X-Complaints-To: usenet-abuse@arcor.de X-Received-Bytes: 6061 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Date: 2012-04-16T19:11:14+02:00 List-Id: On 16.04.12 17:31, Dmitry A. Kazakov wrote: > On Mon, 16 Apr 2012 17:01:05 +0200, Georg Bauhaus wrote: > >> On 16.04.12 15:06, Dmitry A. Kazakov wrote: >>> On Mon, 16 Apr 2012 13:48:04 +0200, Georg Bauhaus wrote: >>> >>>> On 16.04.12 12:43, Marius Amado-Alves wrote: >>>>> Love OT threads in this clever forum:-) >>>>> >>>>> Actually there is a bit of thruth in the absurd no keyword thing: >>>>> *many* keywords can get in the way of naming identifiers. Ada, for one, >>>>> has a bit too many keywords, with some good identifier candidates (when, >>>>> others...) >>>> >>>> "when" and "others" are general abstractions. What kind >>>> of programs will in effect be about general abstractions? >>> >>> The kind of programs in Ada language, which uses exactly these words. >> >> And these are? (If you could avoid the tautological void. >> Be constructive! ;-) > > All Ada programs that use the case-statement. How now? First, you distinguish syntax from some "rest" of the program, and then, when I do the same, the distinction is gone? My question is: If "others" were moved from syntax to identifiers, then what fraction, and what kind of programs will hugely profit because they can now name things "others"? (In place of "foreigners", or "remaining_parts", or "tail", or "", or ...) >>> Your >>> argument is bogus. If a reserved word is good for the language then it is >>> good for a program in that language. >> >> If a reserved word is good for the language, then it is a general >> abstraction, such as "when", or "others", because is it applicable to >> all kinds of programs regardless of concrete notions. Rephrased: (reserved(word) = good-for(C(identifiers)) => general-abstraction(word) No further conclusions other than a wish for a list of words not recommended for use as identifiers either, such as "what". > => it is bad to use in all programs => it is bad for the language in which > all these programs are written. q.e.d. IIUC, this is close to what I have said about the word "what" as an identifier. "What" is bad in programs except maybe in programs whose problem domain is the singleton word "what". It should not be used as an identifier, IMHO. > Surely "when" and "at" are prefect names for a formal parameter of the type > Time. I disagree. In my initial response, I made them "Leaving_When" and so on, as these names are more meaningful. "at" is worthless without context (at a place? at a time?). You could require context with dot notation. Pkg.T? Pkg.Obj? Really? I cannot at the moment think of a really good way to use "at" as an identifier in the body of a function. when := offset (when => at); Seen from another angle, refactoring becomes a nightmare if you have wish to reuse an Ada function in a PascAlgol-17 program, by rewriting, say, if its profile uses names that are ubiquitously reserved : Index (From => ..., To => ..., ); And vice versa for the reverse. I'd rather not have Ada fans tell me that they couldn't care less, why don't I use Ada etc., when at the same time they are witness to programs breaking because Ada didn't at least warn against using the fairly general word "interface" when it was around already. Clear an plain. Java did better, insofar as "goto" is reserved even though it is not part of the language's syntax. > Also your argument to universality would also apply to the parameters named > "X", "Y", "Left", "Right" all over the LRM. It did not work there, but > suddenly does for "when"? A word may work in an LRM. However, a program's problem domain is not the LRM, in general. Simon Wright has recently shown a nice way how to mend the situation with X and Y for surface orientation, using Ada 2012 (substituting Northings and Eastings in the profile, IIRC). >> "What" as an identifier shouldn't be, IMHO, >> reserved or not, so words like "what" not being reserved does >> not count as counter-argument in my book. I'd rather have a >> list of words not recommended to augment reserved words. > > So either they must be reserved or your argument is wrong. The choice is > yours. There is no MUST here. Programming is a human activity, not to be HALTed: What counts is understandability of a program, which I think is not to be had from some reduction to an ad-hoc rules base on a formalism made for a different purpose (C(identifier)). > Statistically irrelevant. I know I am not statistically relevant. Yet, for actual statistics, if you see how programs are written in the low budget industry that might change your mind. The industry includes Google.