D3 sumtype api

Paul Backus snarwin at gmail.com
Fri Feb 28 12:30:36 UTC 2025


On Friday, 28 February 2025 at 12:22:29 UTC, Dejan Lekic wrote:
> In my view Nullable is fundamentally wrong (I have to call 
> nullify() - whaaaat?), and if something else is based on 
> something that is fundamentally wrong, it will most likely also 
> be fundamentally wrong.
>
> I mean no disrespect, I am giving you an honest opinion here. I 
> do not use Nullable simply because I can't assign null to it - 
> it simply does not make sense to use something with name 
> 'Nullable' and not being able to assign null to it, so I do not 
> use it. I will most likely have the same issue with Option!T, 
> judging from your last reply...

I agree that the name `Nullable` is fundamentally wrong for what 
`Nullable` does. That's why the name is being changed to `Option` 
in Phobos v3.

If what you are looking for is something that keeps the name 
`Nullable`, but changes the functionality to allow assigning 
`null`, then `Option` will not be what you want.


More information about the dip.ideas mailing list