Option!T
Yota
yotaxp at thatGoogleMailThing.com
Tue Dec 10 09:54:36 PST 2013
On Tuesday, 10 December 2013 at 17:28:26 UTC, Andrei Alexandrescu
wrote:
> I talked to a programmer who knows Scala (among others) and he
> mentioned the usefulness of the Option type - a zero or one
> element collection (range in D terminology). Here's an article
> discussing it:
> http://danielwestheide.com/blog/2012/12/19/the-neophytes-guide-to-scala-part-5-the-option-type.html
I really came to love Option when I was working in F#. One of
the things I love about F# is how the language strongly
discourages nulls. Even Anders went on video saying that he
regretted making reference types nullable in C#.
Of course, there's no way to remove the nullable-by-default
nature of reference types in D2, but a guy can dream. =]
More information about the Digitalmars-d
mailing list