[article] Language Design Deal Breakers
deadalnix
deadalnix at gmail.com
Wed May 29 02:20:39 PDT 2013
On Wednesday, 29 May 2013 at 07:50:39 UTC, Kenji Hara wrote:
> Currently I recognize that it is necessary to fix compiler bugs
> around
> @disable this(); at least.
>
> @deadalnix, it seems to me that you argue that @disable this();
> is
> insufficient or useless to implement NotNull!T. If so, what is
> necessary to
> do it? What is impossible thing by NotNullT?
>
No I'm nto saying that this is impossible, I'm saying that
@disable this() and non nullable pointer are the exact same
feature.
To implement both, the compiler have to track initialization of
the value and yell at you if it isn't done, or if the value read
before being initialized.
I don't understand why this is so hard to understand. I started
discussing this because people where claiming that non null makes
the compiler more complex to implement, which is completely false.
Now, as D assume all over the place that everything can be
initialized by default, so making @disable this work require a
larger design change than simply pluging holes. It means that as
of now, some entities can't be initialized by default.
More information about the Digitalmars-d
mailing list