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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: two questions on allocators Date: Fri, 02 Mar 2018 09:20:49 +0000 Organization: A noiseless patient Spider Message-ID: References: <93229821-ae3d-4e47-91d9-a20ff3c1f1a7@googlegroups.com> <55fda761-55f8-4b25-b8ab-0125acf16b05@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="cb0ce6b88e79faa324713594e96fde31"; logging-data="23097"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bKHui9Ys9Rbft+7mCUpodDOIkYYBRrkM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:4bZERsaUH4Dtrip7IBGaJl0mxz4= sha1:0C01AMQH/maUg35W4sIpZBbfZdg= Xref: reader02.eternal-september.org comp.lang.ada:50790 Date: 2018-03-02T09:20:49+00:00 List-Id: Robert A Duff writes: > "not null" is checked in more places than "Predicate => S /= null". > You might think that means "not null" is safer. I think I'm going to be terminally confused. I'd rather have to work round the fact that something was *going* to be checked than be able to write code (with fingers crossed) using the fact that *in some circumstances* it might not be. I recently (discussed here) came across a problem using a predicate where even Randy wasn't sure whether the predicate check should have been triggered.