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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news4.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Selecting Components Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sat, 07 Jan 2006 20:24:20 GMT NNTP-Posting-Host: 67.3.219.25 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1136665460 67.3.219.25 (Sat, 07 Jan 2006 12:24:20 PST) NNTP-Posting-Date: Sat, 07 Jan 2006 12:24:20 PST Xref: g2news1.google.com comp.lang.ada:2463 Date: 2006-01-07T20:24:20+00:00 List-Id: I guess this is primarily aimed at the language lawyers who hang out here. Thinking about how Ada selects components of things, especially of composite objects, I see that almost every case uses dot notation. Package.Declaration, Record.Component, and so on. The one exception seems to be components of arrays, which use parentheses: Array (Index) Array (Index_1, Index_2) Array (High .. Low) I suppose one argument for this is that it's how it's always been done since the earliest days of FORTRAN. Another is that it allows functions to be replaced by arrays and arrays by functions. However, many languages, including Pascal, Ada's ancestor, use [] for array indices, so the function/array equivalence may not be that strong. 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 ? -- Jeff Carter "Spam! Spam! Spam! Spam! Spam! Spam! Spam! Spam!" Monty Python's Flying Circus 53