[std.c.stdlib] (malloc(something) is null) or (malloc(something) == 0)?

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 20 07:20:24 PDT 2014


Adam D. Ruppe:

> but I prefer "is null" because that is most consistent with 
> other D code (where there might be a difference between the 
> two).

Curiously I do the opposite, I use == to remind me it's a pointer 
:-)

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list