Maybe type in Fortress
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Jan 19 16:56:57 PST 2010
Steven E. Harris wrote:
> Tim Matthews <tim.matthews7 at gmail.com> writes:
>
>> Haskell has the 'maybe' monad so not really innovative.
>
> Yes, and in Scala, "maybe" is called Option¹, which is modeled to
> participate in the expected monadic contracts.
>
>
> Footnotes:
> ¹ http://www.scala-lang.org/docu/files/api/scala/Option.html
BTW what prevents D from defining a NonNull type is disabling the
default constructor. With the advent of @disable, doing that becomes
feasible, but it doesn't become trivial.
Andrei
More information about the Digitalmars-d
mailing list