3 ms·
Aren't Jython `None` values essentially `null`s? But, Kotlin, Swift, and others are starting to get it right. Scala will follow suit--the plan is for 'Dotty', t
by yawaramin 10y ago
Aren't Jython `None` values essentially `null`s? But, Kotlin, Swift, and others are starting to get it right. Scala will follow suit--the plan is for 'Dotty', the next major version of the Scala compiler, to represent nullable types explicitly as `A | Null` (`A` or `Null`). Without that explicit type there will be no way for a type to hold `null`.
Until that happens, in Scala we continue to work through in the presence of potential nulls by wrapping stuff that comes from Java APIs in `Option`s and never explicitly returning `null` from any Scala APIs.