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,efe381d5ed2da234 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!sn-xit-04!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: Benjamin Ketcham Newsgroups: comp.lang.ada Subject: Re: Ada Pointer Problem Date: Sat, 16 Oct 2004 03:53:10 -0000 Organization: Ye 'Ol Disorganized NNTPCache groupie Message-ID: <1097898789.244849@yasure> References: <7KadnU33z-bmpsLcRVn-og@megapath.net> <35f054ea.0410060743.7b73aac3@posting.google.com> User-Agent: tin/1.6.2-20030910 ("Pabbay") (UNIX) (Linux/2.4.20-29.8.progeny.8 (i686)) Cache-Post-Path: yasure!unknown@cascadia.drizzle.com X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) X-Complaints-To: abuse@supernews.com Xref: g2news1.google.com comp.lang.ada:5304 Date: 2004-10-16T03:53:10+00:00 List-Id: Jeffrey Carter 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