Java’s null appears to be an instance of the bottom type. Which is nonsense, as Todd argues at Avail’s website. But I’d rather interpret Java’s null to be Nothing (Avails nil?) as the singleton inhabitant of Option[+A].
> On 03 Mar 2015, at 23:55, Robbert van Dalen <[email protected]> wrote: > > Hmm, may be there are some languages that deal with nulls at compile time: > > Swift’s Option Chaining: > https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/OptionalChaining.html > > Kotlin’s null safety: > http://kotlinlang.org/docs/reference/null-safety.html > > Ceylon’s optional types: > http://ceylon-lang.org/documentation/1.0/spec/html/introduction.html#compiletimesafety > > Btw. Ceylon type system is pretty interesting because it has sub-typing and > union/intersection types.
signature.asc
Description: Message signed with OpenPGP using GPGMail
