comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam@spam.com>
Subject: Selecting Components
Date: Sat, 07 Jan 2006 20:24:20 GMT
Date: 2006-01-07T20:24:20+00:00	[thread overview]
Message-ID: <UrVvf.339$Hd4.149@newsread1.news.pas.earthlink.net> (raw)

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



             reply	other threads:[~2006-01-07 20:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-07 20:24 Jeffrey R. Carter [this message]
2006-01-08  1:09 ` Selecting Components (see below)
2006-01-08  6:18   ` Jeffrey R. Carter
2006-01-08 20:35   ` Keith Thompson
2006-01-08 10:58 ` Dmitry A. Kazakov
2006-01-09  0:12 ` Georg Bauhaus
2006-01-09  4:41   ` Jeffrey R. Carter
2006-01-11  2:29 ` Stephen Leake
2006-01-11  3:01   ` Jeffrey R. Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox