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.8 required=5.0 tests=BAYES_00,PLING_QUERY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aba9ec8a75fce75a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-11 13:33:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: simple question?! (choice of the name "access type") Date: Wed, 11 Jun 2003 20:33:26 +0000 (UTC) Organization: GMUGHDU Message-ID: References: NNTP-Posting-Host: d2-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1055363606 27374 134.91.1.15 (11 Jun 2003 20:33:26 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Wed, 11 Jun 2003 20:33:26 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/831)) Xref: archiver1.google.com comp.lang.ada:39009 Date: 2003-06-11T20:33:26+00:00 List-Id: Robert A Duff 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