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,703c4f68db81387d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!newsfeed.stueberl.de!news-mue1.dfn.de!news-fra1.dfn.de!news.tele.dk!not-for-mail Sender: malo@0x5358c0f0.boanxx18.adsl-dhcp.tele.dk Newsgroups: comp.lang.ada Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <1110377260.350158.58730@z14g2000cwz.googlegroups.com> <422f0c08$1_1@baen1673807.greenlnk.net> <422F142E.9050909@mailinator.com> <42301D39.6080708@mailinator.com> From: Mark Lorenzen Date: 10 Mar 2005 22:22:09 +0100 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: TDC Totalloesninger NNTP-Posting-Host: 83.88.192.240 X-Trace: 1110489729 dtext02.news.tele.dk 172 83.88.192.240:47029 X-Complaints-To: abuse@post.tele.dk Xref: g2news1.google.com comp.lang.ada:9060 Date: 2005-03-10T22:22:09+01:00 List-Id: "Alex R. Mosteo" writes: > Mark Lorenzen wrote: > > "Alex R. Mosteo" writes: > > > >>This is something I don't fully understand. IFAIK, > >> > >>procedure Proc (Blah : access Some_Type); > >> > >>access parameters raise an excepcion if null. So I don't get what adds > >>to the language the > >> > >>Blah : not null access ... > >> > >>construct. > > When using the "not null" access type, it is the responsibility of > > the > > caller to ensure that the parameter value is not null. This way the > > compiler can optimise away checks for a null value in the subprogram > > in question ("Proc" in your case) > > Note that it is still the run-time system (and not the programmer), > > that performs the check, but it is only done once - before calling the > > subprogram. Often the check can be optimised away. > > Thanks for the explanation. You're welcome. But Randy (a language lawyer) put it in perspective with the Ada 2005 standard in another posting, much better than what I could do. Regards, - Mark Lorenzen