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,2843c5eea3415584 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Brian May Newsgroups: comp.lang.ada Subject: Re: APQ References: <1783qdmyn694w.1mvizvesh5ohr$.dlg@40tude.net> Date: Wed, 22 Dec 2004 10:34:12 +1100 Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:vw4FCywzp5uQS4GfKAel4I54aLY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: snoopy.microcomaustralia.com.au X-Trace: news.melbourne.pipenetworks.com 1103672026 202.173.153.89 (22 Dec 2004 09:33:46 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news4.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!news1.optus.net.au!optus!news.mel.connect.com.au!news-north.connect.com.au!news.alphalink.com.au!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:7136 Date: 2004-12-22T10:34:12+11:00 List-Id: >>>>> "Dmitry" == Dmitry A Kazakov writes: Dmitry> Potentially plain access pointers could be more efficient. There have been other benefits described on this newsgroup. For instance, it prevents this type of error: declare A : aliased XYZ_Type; Ptr : XYZ_Ptr_Type := A'Access; begin ... Free(Ptr); end; Sure that is obvious in this case, but in a more complicated situation... The C++ solution is for programmers to impose rules on themselves, e.g. this pointer will only point to memory allocated dynamically. In Ada you can have the compiler enforce these rules, and it makes sense to let the compiler do this. -- Brian May