Re:Plans for OCaml 4.08
by woolvalley on Wednesday July 04, 2018 @11:09PM
(#17460612)
No as in something like swift optionals:
https://www.tutorialspoint.com/swift/swift_optionals.htm
It's also called nullability support, you can see it in use in this article:
http://journal.stuffwithstuff.com/2011/10/29/a-proposal-for-...
Re:Plans for OCaml 4.08
by Raphael_Amiard on Thursday July 05, 2018 @02:21AM
(#17461210)
I'm not sure what you mean, optionals are just a sum type (says so in your own article) and Ocaml support for them is first class, also option is a built in Ocaml type http://batteries.forge.ocamlcore.org/doc.preview:batteries-b...
Julia and C# call it Nullable, other Languages Option or Maybe.
Option type on wikipedia, cant paste the link somehow.
Oh, option types! I don't know Julia or C#, so never heard this called nullability before.
On any case, as someone else pointed out, OCaml had supper for option types built in, through sum types.
I agree that sum types are indispensable in a modern programming language.
Nullability? As in null references? The "billion-dollar mistake" (Tony Hoare, referring to Algol), also frequently called the "worst mistake in computer science"?