comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <sb463ba@d2-hrz.uni-duisburg.de>
Subject: Re: simple question?! (choice of the name "access type")
Date: Wed, 11 Jun 2003 20:33:26 +0000 (UTC)
Date: 2003-06-11T20:33:26+00:00	[thread overview]
Message-ID: <bc83mm$qne$1@a1-hrz.uni-duisburg.de> (raw)
In-Reply-To: wccof1477gq.fsf@shell01.TheWorld.com

Robert A Duff <bobduff@shell01.theworld.com> wrote:
: Kilgallen@SpamCop.net (Larry Kilgallen) writes:
: 
:> The value of an access type can be used to access objects of some
:> other type (designated when the particular access type was declared).
:> 
:> The other name which access types might have been called is "pointers",
:> but they lack many of the aspects (drawbacks) of pointers in other
:> languages:
:> 
:>               You cannot arbitrarily add to access types as one would
:>                       do in C to walk down an array (or walk off the
:>                       end of an array).
: 
: But Ada is descended from Pascal, and you can't do pointer arithmetic in
: Pascal, either.  Yet Pascal calls them "pointers".

Hm. Dewar says, in http://www.adapower.com/lang/accessmem.html,

  "Finally, yes, you could use address arithmetic
  (good old pointer arithmetic), and indeed Ada has
  much more flexible pointer arithmetic than C (in
  Ada, unlike C, you can do arbitrary address
  arithmetic, e.g.  compare any two addresses, in a
  portable manner).  However, this is much lower
  level and will kludge up your code unnecessarily."


: 
: I think it was silly and obfuscatory for Ada to call them "access
: types".  It also makes talking about them harder: for most types,
: there's a simple noun you can use to refer to values or objects of the
: type.  If a program says:
: 
:    type T is range 1..10;
:    X: T;
: 
: you can say "X is an integer".  The value of integer types are
: "integers".  But for access types you can't say "X is an access", nor
: "the value of access types are accesses". 

Couldn't you say, "X is an access to Foo"?, in parallel to the
declaration?

: (I have the same complaint
: about protected types -- there's no such thing as a "protected".)

And here, "X is a protected value"?



-- Georg



  reply	other threads:[~2003-06-11 20:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-11  6:59 simple question?! prashna
2003-06-11 11:08 ` Wojtek Narczynski
2003-06-11 11:31 ` simple question?! (choice of the name "access type") Larry Kilgallen
2003-06-11 19:13   ` Robert A Duff
2003-06-11 20:33     ` Georg Bauhaus [this message]
2003-06-12  8:58     ` Keith Thompson
replies disabled

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