What is the rationale behind enabling Nullable!T to be used as a regular T?

Petar Petar
Fri Feb 14 14:45:16 UTC 2020


On Friday, 14 February 2020 at 14:43:22 UTC, Petar Kirov 
[ZombineDev] wrote:
>
> The two ends of the design spectrum (as I see it) are:
> 1. `Optional(T) x` as a range of [0,1] elements of type `T`. 
> For all possible operations `op` on type `T` there exists an 
> operation `Option(T).op` and the effect of executing is 
> equivalent to `x.map!fun`.

Edit: `x.map!op`.




More information about the Digitalmars-d mailing list