The NaN of types (in D)

Paul Backus snarwin at gmail.com
Sun Oct 11 20:37:56 UTC 2020


On Sunday, 11 October 2020 at 19:45:06 UTC, Stefan Koch wrote:
>
> ø is a special case that shouldn't happen to often.
>
> You are free to ignore the possibility of it being null.
> Just like with classes which almost no one checks with class is 
> null.

Given that null references for classes are widely considered a 
"billion dollar mistake" [1], the comparison does not exactly 
fill me with confidence.

Is there a serious problem with using __type* when you need 
something nullable, and __type otherwise? It seems like the best 
of both worlds to me.

[1] 
https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/


More information about the Digitalmars-d mailing list