Adding the ?. null verification

Etienne via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 19 08:35:57 PDT 2014


> I've been thinking about the name. I realize that it's not a true monad
> in the Haskell sense, even though the implementation *was* inspired by
> deadalnix's mentioning of the Maybe monad, so we really should call it
> something else.  "failsafe" sounds a bit too generic. What about
> "safeDeref" or just "deref"?
>
> OTOH, I wonder how easy it would be to refine the current implementation
> to become a true monad?
>
>
> T
>

ValueType!T / valueType(t) maybe? Its only purpose is to treat ref types 
as value types in a cascading way without restriction even when they're 
null... No idea how it could become a monad.


More information about the Digitalmars-d mailing list