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.233.69 with SMTP id tu5mr10890265pbc.6.1334612918381; Mon, 16 Apr 2012 14:48:38 -0700 (PDT) Path: r9ni64204pbh.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!news.internetdienste.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 16 Apr 2012 23:48:15 +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> <4f8c52b2$0$7627$9b4e6d93@newsspool1.arcor-online.net> <9s7d2eufbh6f$.1ivcyxfztaq42$.dlg@40tude.net> In-Reply-To: <9s7d2eufbh6f$.1ivcyxfztaq42$.dlg@40tude.net> Message-ID: <4f8c93a0$0$6638$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 16 Apr 2012 23:48:16 CEST NNTP-Posting-Host: ef4f716d.newsspool2.arcor-online.net X-Trace: DXC=fcogkCX_eC5gP]QSEBQ^d4A9EHlD;3Yc24Fo<]lROoR18kFejV8:iWoJ3fm49;eWHP_PT]Be5 X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-04-16T23:48:16+02:00 List-Id: On 16.04.12 20:00, Dmitry A. Kazakov wrote: > You asked for examples of programs allegedly suffering from generality of > the word "when", here is one: Actually I asked for programs that profit from generality of words like "when" used as identifiers. > case Alignment is > when Left => ...; > when Right => ...; > when Middle => ...; > end case; What's the pain? >> 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"? > > No, it is you who have to show a great number of reasonable written > programs hugely suffering if "others" were allowed as an identifier. I have tried to explain that generic identifiers do not inform about specific things. "Others" is a generic, unspecific word. Is there a fraction of programs that profit from generic, unspecific identifiers? What is it? > Should not be used /= must be reserved. Er, yes, did I say that those words should be reserved? I imagine that one might draw this conclusion if arguing within a certain set of premises that isn't mine. > The argument you were trying to make is about illegal words, ones which may > not to used (because they sound bad for you). Example in Ada: > "0_Illegal___identifier" My bad if I did. I think I mentioned a wish for a list of words not recommended for use as identifiers, in addition to the one Ada reserves. >>> 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. > > Counter example: Only in case of universally quantified propositions. None of my business. But anyway, > procedure Leave (When : Time); ... begin while Now < When loop delay Step; Now := Clock; end loop; Left (Slot (When)) := Now; -- NB p.p. of to leave end Leave; I have tried to choose only unspecific or ambiguous nouns. Do you find this to be explaining itself well? Note the "well," not: possible to understand for the next few moments. begin while Now < Scheduled_Departure loop delay Pausing_Time; Now := Clock; end loop; Actual_Departure (Minute_Of (Scheduled_Departure)) := Now; end Leave; The first solution lets insiders pride themselves of knowing what the generic words mean, the second solution less so, I think. (I claim that neither is perfect.) >> 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). > > I wonder what Australians would say about that. You don't mean that Australian drivers (or pilots) do not know how to head North? >>>> "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. > > See. In other words, there are other reasons why "when" is reserved. > Exactly my point. Not the point in question, I think. The point in question is what happens when even words like "when", i.e. even those that happen to be reserved now, do loose that special status. (Again, my desire to have a list of words that should be _effectively_ reserved, maybe trigger a warning, even when they can be used as identifiers.) >>> 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. > > You mean that low budget industry has no access to an editor capable to > colourise Ada source code? Come on, gedit, AdaGide, GPS are free! A graphical terminal on site? Wow! I am used to SSH. But I meant the thoughtless choice of identifiers that just happens, like sh*t. It is easier to choose generic words as identifier when a programming language is more permissive, Simply because it is harder to think of good names than to speak in broad, generic terms. So Ada unproven "limitation" is an accidental benefit of "when" etc. being reserved words. (I will not insist that this phenomenon is a low budget phenomenon, but I would think that software written in relatively expensive environments that feature quality control (even when functioning as a ritual only) do not let inscrutable cleverness pass. At least when it is understood that software matters.)