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,5dacec64c8c879fa X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.74.201 with SMTP id w9mr9529786pbv.0.1328632781651; Tue, 07 Feb 2012 08:39:41 -0800 (PST) Path: lh20ni271073pbb.0!nntp.google.com!news2.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Preventing Unchecked_Deallocation? Date: Tue, 07 Feb 2012 11:39:40 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <33a35da4-6c3e-4ab4-b58f-a9d73565d79a@t30g2000vbx.googlegroups.com> <4350713b-6ac3-4b22-b221-8da2bac52fea@t5g2000yqk.googlegroups.com> <26e4f2a4-edae-4e37-8697-f2390e636a21@z31g2000vbt.googlegroups.com> <645ab281-7fde-40ed-ab24-bc2b42bcda1a@15g2000vbq.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1328632781 6165 192.74.137.71 (7 Feb 2012 16:39:41 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 7 Feb 2012 16:39:41 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:92MLrTx0tzHmSLdueO1p80zdOrg= Content-Type: text/plain; charset=us-ascii Date: 2012-02-07T11:39:40-05:00 List-Id: Shark8 writes: > You know, I remember reading somewhere that Ada chose ACCESS because > it could be implemented as something other than an integer... like a > record (remember the segment:offset pairs on the 286?). I've heard things like that, too. But it makes no sense to me. How could calling something "access" instead of "pointer" or "reference" affect its semantics? It just confuses people. Pascal calls these things "pointers", and their semantics is the same as Ada[*] access types, so there's nothing about the word "pointer" that needs to imply "low-level, hardware address, address arithmetic, just-an-integer, etc". [*] Ada 83, that is. Later versions of Ada added some additional functionality, some of which is LESS safe than Pascal pointers. > Technically still an "address stored in memory" but far better (IMO) > than the "yeah-its-an-integer" of most other languages. I don't think there's any such implication in most other languages. After all, C is implemented on 8086 and 80286 using segment:offset pointers. And it's possible to implement a bounds-checked version of C using fat pointers -- but it would be grossly inefficient. - Bob