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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.12.94 with SMTP id w91mr2625956ioi.85.1519948037492; Thu, 01 Mar 2018 15:47:17 -0800 (PST) X-Received: by 10.157.11.165 with SMTP id 34mr168398oth.7.1519948037416; Thu, 01 Mar 2018 15:47:17 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no77402ita.0!news-out.google.com!a25ni94itj.0!nntp.google.com!w142no77400ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 1 Mar 2018 15:47:17 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <93229821-ae3d-4e47-91d9-a20ff3c1f1a7@googlegroups.com> <55fda761-55f8-4b25-b8ab-0125acf16b05@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: two questions on allocators From: Shark8 Injection-Date: Thu, 01 Mar 2018 23:47:17 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1827 X-Received-Body-CRC: 294551692 Xref: reader02.eternal-september.org comp.lang.ada:50780 Date: 2018-03-01T15:47:17-08:00 List-Id: On Thursday, March 1, 2018 at 4:17:55 PM UTC-7, Robert A Duff wrote: > > I can't think of any case in which "not null" is better > than the predicate. Sometimes they are the same, sometimes > "not null" is worse; hence my recommendation to not use it. What about interfacing for a library: using "not null" on a parameter means that the body of the program needn't make the manual check for the parameter being null. Probably with thin-bindings (ie if you're importing rather than exporting) is a good idea, too... then the Ada-side calls can catch it and save you from that madness.