That is the one thing I miss also.
The solution until now is to use a wrapper struct around a class, but that is _very_ annoying and a good language should have something on their own.

But it is right, for D2 this mistake is going to long as you can change it so soon. But maybe a Syntax like in C++ could help: If you want a not nullable reference use &: void foo(Foo& f) { and if you want a nullable Reference do nothing extra. I still work on a (pre)compiler that converts statements like Foo& f into Ref!Foo but I think D should do this on their own.

Reply via email to