'idiomatic' porting of c and or c++ code that does NULL checking
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Aug 23 04:07:14 PDT 2014
On Sat, 23 Aug 2014 10:53:03 +0000
bearophile via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:
> I use "is" and "!is" for class references and == != for pointers.
> But now I think you are right, and in D it's better to always use
> is and !is for both, to avoid present and future bugs (like when
> a pointer gets replaced by a class reference by successive
> changes in the code).
and "foo is null" is nice to read. ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140823/01e67768/attachment.sig>
More information about the Digitalmars-d-learn
mailing list