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.1 required=5.0 tests=BAYES_00,PDS_OTHER_BAD_TLD autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6aa1ec264ce25142 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.82.166 with SMTP id j6mr1062369wiy.1.1346980966408; Thu, 06 Sep 2012 18:22:46 -0700 (PDT) Path: q11ni5513255wiw.1!nntp.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: William Findlay Newsgroups: comp.lang.ada Subject: Re: Real syntax problems in Ada Date: Thu, 30 Aug 2012 23:54:10 +0100 Message-ID: References: <1p5r39cusgc1n$.18nj9sytckk6$.dlg@40tude.net> Mime-Version: 1.0 X-Trace: individual.net ePx49dYAVZsCJk/uo2i/Nwkd8JygfgjCP14NA9hAyekPePLD0bUCHjp/cXplBPc3YU Cancel-Lock: sha1:1YxVJzV4blCbSCtcrpoRI8NQjYI= User-Agent: Microsoft-Entourage/12.33.0.120411 Thread-Topic: Real syntax problems in Ada Thread-Index: Ac2HAl36DQPJDdnPaUGG0UUJb2/6SA== Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: 2012-08-30T23:54:10+01:00 List-Id: On 30/08/2012 23:34, in article d9d6d423-cc2b-4e97-ac06-8e684c756006@googlegroups.com, "Adam Beneschan" wrote: > On Thursday, August 30, 2012 3:06:41 PM UTC-7, (unknown) wrote: >> On Tuesday, August 28, 2012 4:13:02 AM UTC-4, Dmitry A. Kazakov wrote: >> >>> What are real problems with Ada syntax as opposed to the imaginary ones >> >> Not that it's a syntax problem, but I've always been suprised by the choice >> to use 'all' to explicitly dereference an access value; I don't think a >> casual reader of the langauge would be able to guess what it does. > > It makes some sense if A is an access to a record; then you can say A.abc for > component "abc" in the record, A.xyz for component xyz, and A.all for the > whole thing, i.e. all components. Of course, to be consistent, that would > mean that if A were an access to an array, we'd use A(2) for the index=2 > element, A(2..5) to refer to a slice of the array, and A(all) to refer to the > entire array. Oh well. This is more a comment on the thread in general than on Adam's remark. There is a famous quotation by Emerson: A foolish consistency is the hobgoblin of little minds. While there is much to be said for a general predictability of style and syntax, a principle that Ada follows by and large; it is also true that a moderate variety of expression sharpens the attention and prevents a text from melting into a homogeneous mass with few obvious points of reference. Some of the proposals seem to risk falling into that trap, in my view. I think Ada has it about right. -- Bill Findlay with blueyonder.co.uk; use surname & forename;