Struct with default ctor (Was: [dmd-beta] dmd 2.064 beta take 2)
Dicebot
m.strashun at gmail.com
Mon May 20 07:57:16 PDT 2013
On Monday, 20 May 2013 at 14:49:32 UTC, estew wrote:
> Now I want to access a pointer, write code using it etc. But I
> need to manually track at development time whether it is
> NotNull!T, Null!T, Maybe!T, Option!T or whatever. I cannot just
> have a pointer anymore, knowing it's initialised to null.
Yes and this is awesome. This is correctness enforced by type
system. Because if you _don't_ track this, you have a possible
error in your code. Only difference between nullable and
non-nullable pointers by default is that latter _force_ you to
write correct code. Which is good.
More information about the Digitalmars-d
mailing list