comp.lang.ada
 help / color / mirror / Atom feed
From: Benjamin Ketcham <bketcham@drizzle.com>
Subject: Re: Ada Pointer Problem
Date: Sat, 16 Oct 2004 03:53:10 -0000
Date: 2004-10-16T03:53:10+00:00	[thread overview]
Message-ID: <1097898789.244849@yasure> (raw)
In-Reply-To: UGW8d.4342$UP1.3442@newsread1.news.pas.earthlink.net

Jeffrey Carter <spam@spam.com> wrote:
> 
> The terminology is not snobbishness but precision. The language 
> definition should not unnecessarily constrain implementations. An access 
> value may not necessarily be just a pointer; it may contain bounds 
> information if it designates an unconstrained array type, for example, 
> and there are such implementations.

But even in C, it is already understood (by some, and pedantically
explained to the others on a near-daily basis) that "pointers" are
abstract entities, not necessarily the same as "machine addresses";
some implementations transparently use "fat pointers"; and in all
cases, additional information than the "address" can be considered
to be conceptually contained within the pointer, i.e., the type of
the referenced object, particularly the size/alignment for stride
calculations (though of course that information is typically not actually
carried around in the bit pattern, rather is applied at compile-time).

> There was also a design principle that shorter names were preferable: 
> "task" instead of "thread" or "process", "access" instead of "pointer".

But it's not an "access", it's an "access type".  Longer, plus more
than one word.

> Finally, "is access X" reads better than "is pointer X".

Right, to be grammatical (and to match existing verbal usage) you'd
say "is (a) pointer *to* X".  Of course in the code, you'd say something
much more compact, not involving English words at all: whether that is
an advantage or a disadvantage is obviously the territory of religion!
I know which I prefer, but then I like assembly language too.

Also, seems to me, "pointer" is a noun, "access" is normally a verb.
The nouning of verbs doesn't necessarily make for better reading, IMO.

And finally, "pointer to X" very intuitively describes what the
construct does, in a way that makes sense to the first-year CS student
and the deep hardware engineer alike.  "Access type" seems like obtuse
government terminology, divorced from any physical or intuitive
meaning.  How is one to guess that the "access" is by indirection?
I want to "access" *all* my variables!  What is the opposite of
"access", a no-read/no-write type?  Sounds very Zen.
Are not the indexing of an array, calling of a function, ":=", etc., also
examples of "access methods"?  Shouldn't it really be called the
"indirect access type" or "access-by-reference type"?  Yeah, there
we go, getting to my real criticism of Ada: not verbose enough. ;)

--Benjamin




  reply	other threads:[~2004-10-16  3:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-01 19:34 Ada Pointer Problem aschwarz1309
2004-10-02  0:47 ` Jeffrey Carter
2004-10-02 23:37   ` Randy Brukardt
2004-10-06 15:43     ` skidmarks
2004-10-06 18:19       ` Jeffrey Carter
2004-10-16  3:53         ` Benjamin Ketcham [this message]
2004-10-16 13:25           ` John B. Matthews
2004-10-18 18:09           ` Georg Bauhaus
2004-10-06 19:29       ` Georg Bauhaus
2004-10-07 18:45         ` skidmarks
2004-10-08  0:35           ` Jeffrey Carter
2004-10-08 12:02           ` Jean-Pierre Rosen
2004-10-08 16:58             ` Ludovic Brenta
2004-10-08 23:26             ` Björn Persson
2004-10-10 18:01             ` skidmarks
2004-10-08 14:03           ` Georg Bauhaus
2004-10-08 14:23           ` Dale Stanbrough
  -- strict thread matches above, loose matches on Subject: below --
2004-10-01 15:26 skidmarks
2004-10-01 15:50 ` David C. Hoos
2004-10-01 18:15   ` Jeffrey Carter
2004-10-01 17:24 ` Ludovic Brenta
replies disabled

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