On Saturday, 6 April 2013 at 08:10:30 UTC, bearophile wrote:
Zach the Mystic:

Not disagreeing, but you had mentioned nullable types before, and I was wondering what they might look like also. Have you made an enhancement for these I could examine?

I opened this:
http://d.puremagic.com/issues/show_bug.cgi?id=4571

Part of the syntax is:

T? means T nullable
T@ = means not nullable.

But that ER is a confused mess, and in the meantime the @disable was introduced. Now the probability of such nullable syntax+semantics to be introduced in D is very low, so probably I will close down that ER.

Bye,
bearophile

Once dmd pull 1724 is merged, it would be possible to write:

class A {}

enum E : A
{
   e = new A
}

void main()
{
  E e; //a is allocated on heap
}

So, E type is some kind of nullable type (but this approach has drawbacks).

Reply via email to