top | item 28228605

(no title)

logical42 | 4 years ago

You know what's fun?

Getting a nil where you are supposed to have an Optional.

discuss

order

mattnewton|4 years ago

Afaik this is impossible in swift and kotlin, only optional values can contain nill.

tbarbugli|4 years ago

Try Core Data with Swift and you will see that happening. Lazy objects (vaults) are mapped from objc into Swift and will happily crash on something like a = b where both are not optional.

logical42|4 years ago

It's possible in Java.

rowanG077|4 years ago

so... Just make that impossible. It's not like this is unprecedented at this point. It's a standard feature even C++ of all languages supports.

joshdev|4 years ago

Somebody has used Scala

still_grokking|4 years ago

More likely a Java lib form Scala than Scala as such.

In "pure" Scala (not in the FP sense, but just without mixing with Java) something like that is almost impossible.