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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bd2212324e79c720 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!news-feed-01.socal.rr.com!news.rr.com!cyclone2.kc.rr.com!news2.kc.rr.com!tornado.socal.rr.com.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Selecting Components References: From: Keith Thompson Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:SBH+MVjArMKi/meE6/N2TGE1RwU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 08 Jan 2006 20:35:48 GMT NNTP-Posting-Host: 66.75.136.120 X-Complaints-To: abuse@rr.com X-Trace: tornado.socal.rr.com 1136752548 66.75.136.120 (Sun, 08 Jan 2006 12:35:48 PST) NNTP-Posting-Date: Sun, 08 Jan 2006 12:35:48 PST Organization: Road Runner High Speed Online http://www.rr.com Xref: g2news1.google.com comp.lang.ada:2468 Date: 2006-01-08T20:35:48+00:00 List-Id: "(see below)" writes: > On 7/1/06 20:24, in article > UrVvf.339$Hd4.149@newsread1.news.pas.earthlink.net, "Jeffrey R. Carter" > wrote: > >> What would be the consequences if a language were designed so that all >> selections used dot notation, including arrays: >> >> Array.Index >> Array.Index_1, Index_2 >> Array.Low .. High > > The consequence would be ambiguous arithmetic expressions. > > Consider: > > Array.Index + 1 > > is this (Array.Index)+1 or Array.(Index+1)? Presumably it would be (Array.Index) + 1; there's no reason for "." to have a different precedence for arrays than for records. There's a visual ambiguity: does Foo.Bar mean the Bar'th element of the array Foo, or the component Bar of the record Foo? This is of course resolved by the type of Foo (unless Foo is an overloaded function), but what's easy for the compiler may be difficult for a human reader. -- Keith Thompson (The_Other_Keith) kst-u@mib.org San Diego Supercomputer Center <*> We must do something. This is something. Therefore, we must do this.