On Friday, 30 November 2018 at 15:32:55 UTC, 12345swordy wrote:
On Friday, 30 November 2018 at 12:00:46 UTC, Atila Neves wrote:
On Thursday, 29 November 2018 at 18:31:41 UTC, SimonN wrote:
On Monday, 19 November 2018 at 21:23:31 UTC, Jordi Gutiérrez Hermoso wrote:
[...]

[...]

100 % agree that there should be non-nullable class references, they're my main missing feature in D. Likewise, I'm astonished that only few D users wish for them.

https://github.com/aliak00/optional/blob/master/source/optional/notnull.d

"But I don't like the verbosity!"

alias MyClass = NotNullable!MyClassImpl;

Huh neat, though it would nice to allow conversion of Nullable to NotNullable via runtime conditional checking.

NotNullable!MyClassImpl = (MyClassImpvar != Null) ? MyClassImpvar : new MyClassImpvar();
I meant new MyClassImp(), but you get the idea.

Reply via email to