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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,501a1c2d3961ac5c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: =?utf-8?B?W05vdCBpbXBvcnRhbnRdIHRoZSDigJxub3QgbnVsbOKAnSBub3RhdGlvbiA=?= =?utf-8?B?aW4gQWRhIDIwMDU=?= Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Sat, 26 Mar 2011 08:02:45 +0100 Message-ID: NNTP-Posting-Date: 26 Mar 2011 08:02:44 CET NNTP-Posting-Host: 545e5e98.newsspool3.arcor-online.net X-Trace: DXC=U?fO<1Dd^m2LNKYb?b>076McF=Q^Z^V384Fo<]lROoR18kF[__IH:D\fRa= X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:18458 Date: 2011-03-26T08:02:44+01:00 List-Id: On Fri, 25 Mar 2011 16:45:28 +0100, Yannick Duchêne (Hibou57) wrote: > I remember some peoples says here, this is a pity to have “not null” > annotations, while the case which should be clearly marked, is the one > where a reference may be null. I'm OK with that principle. But concretely > what would have been the notation ? “may be null” ? Two reserved words > added for that ? A simple “null” would not have been really expressive > (just a though I get right a few minutes ago). No notation needed. Before Ada 2005 broke it, "access T" was not null, if anonymous type is what you mean. Named type is a different beast. When you declare a named access type "not null" is a constraint. You cannot have a constrained subtype before the type. Yet another story is an access type, which does not have null as a value. It is not much different from being constrained. Compare it with integer types. When you declare: type P is range 1..2; You do not eliminate 0, as you might think. P has a "parent type," which still has 0 (P'Base). So which case you meant? (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de