implicit construction operator
ketmar
ketmar at ketmar.no-ip.org
Mon Feb 26 19:32:44 UTC 2018
WebFreak001 wrote:
> Now before you would have only been able to do this:
>
> ---
> Nullable!Foo a;
> foo(a, Nullable!int(5));
> ---
>
> but now you should also be able to do:
>
> ---
> Nullable!Foo x = null;
> Nullable!Foo y = 5;
>
> foo(null, 5);
please no. such unobvious type conversions goes out of control really fast.
there is a reason why D doesn't have such thing, this is not an oversight,
but a design decision.
More information about the Digitalmars-d
mailing list