Adding the ?. null verification
David Gileadi via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 23 10:37:11 PDT 2014
On 6/21/14, 4:32 PM, deadalnix wrote:
> On Saturday, 21 June 2014 at 22:40:32 UTC, H. S. Teoh via Digitalmars-d
> wrote:
>> On Sat, Jun 21, 2014 at 03:26:45PM -0700, Andrei Alexandrescu via
>> Digitalmars-d wrote:
>>> On 6/19/14, 1:29 PM, Etienne wrote:
>>> >writeln(currAssignment.safeDeref.typeInfo.ident.or("meh"));
>>>
>>> "or" is really nice and terse. I think we should add that to std.
>>> safeDeref isn't the best choice of name.
>> [...]
>>
>> What's your suggestion?
>>
>>
>> T
>
> maybe is fine. Last time I checked, it isn't only a monad in haskell,
> but also vastly used by these peoples who speak english.
I like "maybe" too. "nullSafe" might also be a reasonable bikeshed color.
More information about the Digitalmars-d
mailing list