Object as function argument

Chris Sperandio via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 5 12:08:07 PST 2015


Ok... So, in D when I work with Object, it's like if I work with 
only pointers.
Thus, I can return null from a function which returns an Item 
instance.
Is it clean to write this code below ?

   static Item nullReturn(Item item)
   {
    // ...
    // and for some cases
     return null;
   }


More information about the Digitalmars-d-learn mailing list