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!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Wed, 09 Mar 2005 16:41:00 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.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> Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: Wed, 9 Mar 2005 16:43:11 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-89f8Ne/qMznaIiXvMkoDWUTtS5hOh+uQo6XRwF82R/vrfL15w1C89lPhyqqb2ETOGZg5jW7iw3O+nAc!XsMqjwhO7xcLu8bWwt4sN3SzmgC4sc6F9jssI+6lPid/Wx5V2jYDaCg/b6FyS/92SQRZzaNPrV0B X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:8981 Date: 2005-03-09T16:43:11-06:00 List-Id: "Alex R. Mosteo" wrote in message news:422F142E.9050909@mailinator.com... > This is something I don't fully understand. IFAIK, > > procedure Proc (Blah : access Some_Type); > > access parameters raise an excepcion if null. Not in Ada 2005. That restriction makes it very difficult to do C interfacing, among other things. Moreover, keeping the restriction would have made the expansion of anonymous access types to most contexts unusable (you need a null value sometimes!). The only case where "not null" is implicit is if the parameter is controlling (that's necessary for compatibility - I think most of us hate it, but there doesn't seem to be an alternative). > So I don't get what adds > to the language the > > Blah : not null access ... > > construct. Because it (a) makes the restriction explicit, and (b) you can use it anywhere: on named access types, on variables and components, in generic formals, etc. type Acc is access Some_Type; procedure Proc (P : in not null Acc); Randy Brukardt