comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: two questions on allocators
Date: Thu, 1 Mar 2018 15:47:17 -0800 (PST)
Date: 2018-03-01T15:47:17-08:00	[thread overview]
Message-ID: <ccdd14ee-86ca-41ec-99c1-d8f6a1b66f9e@googlegroups.com> (raw)
In-Reply-To: <wcctvtzqtb1.fsf@TheWorld.com>

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.


  reply	other threads:[~2018-03-01 23:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23 20:42 two questions on allocators Mehdi Saada
2018-02-23 22:30 ` Shark8
2018-02-23 23:30   ` Mehdi Saada
2018-02-25  2:17     ` Randy Brukardt
2018-02-24 10:20   ` AdaMagica
2018-02-24 10:18 ` AdaMagica
2018-02-25 12:12 ` Mehdi Saada
2018-02-26 23:02   ` Randy Brukardt
2018-02-28 16:09   ` Robert A Duff
2018-02-28 23:37     ` Randy Brukardt
2018-03-01  8:30       ` Dmitry A. Kazakov
2018-03-01 23:17       ` Robert A Duff
2018-03-01 23:47         ` Shark8 [this message]
2018-03-02  9:20         ` Simon Wright
2018-03-02 22:37           ` Randy Brukardt
2018-03-02 22:31         ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox