What's the D equivalence?

Imperatorn johan_forsberg_86 at hotmail.com
Sat Mar 6 17:10:56 UTC 2021


On Saturday, 6 March 2021 at 16:30:04 UTC, Nick Treleaven wrote:
> 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);

I basically just follow some purity rules. I'm talking C# now 
tho. But I guess I'd do smth similar in D.


More information about the Digitalmars-d mailing list