What's the D equivalence?

Nick Treleaven nick at geany.org
Sat Mar 6 16:30:04 UTC 2021


On Saturday, 6 March 2021 at 14:44:36 UTC, Imperatorn wrote:
> I'm used to just doing it manually when needed, just like I 
> null-check my objects in c# before accessing some property for 
> example.

How do you remember if a function handles null or not? E.g. for 
class references:

c = new C;
f(c); // did this modify c by `ref` parameter?
// <<< do I need to check null here?
g(c);


More information about the Digitalmars-d mailing list