Max Samukha:

The question is what should be the result of:

Nullable(int*)?
Nullable!(Nullable!T)?

Forbidden (like in C#)? Aliased to the source type? A distinct type?

In D Nullable!(int*) needs to be a different type, because the interface is different between a pointer and a Nullable.

But often you want to use something like Nullable(int*, null) or Nullable(int*, cast(int*)null) instead.

In the second case maybe it can be collapsed into a single Nullable, but such behavior needs to be documented.

Bye,
bearophile

Reply via email to