On 05/23/2016 08:10 PM, cy wrote:
I was squinting at the std.typecons.NullableRef code and it _looks_ like
isNull is only checked at runtime (and not checked at all in release
mode!) but D has surprised me before in its ability to pre-calculate
stuff during compilation.
NullableRef is little
.
[...]
NullableRef is checked at compile time only if you "hold the
door".^^
I was squinting at the std.typecons.NullableRef code and it
_looks_ like isNull is only checked at runtime (and not checked
at all in release mode!) but D has surprised me before in its
ability to pre-calculate stuff during compilation.
I was thinking of using something like this: