Nullable!T to T is a narrowing conversion, since T cannot express the null case. Therefor, it must not be implicit.
Re: Is there a strong reason for Nullable's alias get this?
FeepingCreature via Digitalmars-d Mon, 16 Apr 2018 03:16:21 -0700
Addendum: The general principle is that a "narrowing conversion"
should never be implicit. An example of a narrowing conversion is
float to int, or int to short. In the case of integer types, D
already follows this rule.
- Is there a strong reason for Nullable's... FeepingCreature via Digitalmars-d
- Re: Is there a strong reason for N... Jonathan M Davis via Digitalmars-d
- Re: Is there a strong reason for N... FeepingCreature via Digitalmars-d
- Re: Is there a strong reason f... FeepingCreature via Digitalmars-d
- Re: Is there a strong reas... SimonN via Digitalmars-d
- Re: Is there a strong reason for N... FeepingCreature via Digitalmars-d
- Re: Is there a strong reason f... Nick Treleaven via Digitalmars-d
- Re: Is there a strong reas... FeepingCreature via Digitalmars-d
- Re: Is there a strong ... Nick Treleaven via Digitalmars-d
- Hit a snag FeepingCreature via Digitalmars-d