On Sat, 23 Aug 2014 10:19:58 +0000
nikki via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:

don't use '==' to check for nulls. the right way is:

  if (foo is null) {}
  if (bar !is null) {}

'==' transforms to opEquals call (see 'operator overloading') and 'is'
not.

as for 'best practice' question -- it depends of many things. ;-)

Attachment: signature.asc
Description: PGP signature

Reply via email to