On 9/16/13 11:56 AM, Namespace wrote:
I hate this NotNull struct hack. It is the same crap as the current scope solution.
Scoped variables in the language were a lot worse.
BTW: I'm curious which built-in feature will be removed next, maybe AA?
If we're diligent and lucky, hopefully.
An annotation like Foo! f would be much nicer than NotNull!Foo or @NotNull Foo, but it would be an agreement.
Is annotation the only or main problem?
And I agree absolute, to disable default CTor's by struct's was a huge mistake. But D is full of those. ;)
They are not disabled. It seems many people are having trouble with getting default constructors to evaluate code, so I assume you mean that. One possibility (or first step) would be to relax the language to allow CTFE-executable code in default constructors.
Andrei