3 ms·
Afaik this is impossible in swift and kotlin, only optional values can contain nill.
by mattnewton 5y ago
Afaik this is impossible in swift and kotlin, only optional values can contain nill.
- tbarbugli 5y agoTry 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.
- mattnewton 5y agoThis is happening in objc code or in the swift part? I'm not terribly surprised though, my one experience with core data was miserable once we strayed even a little from the happy path and I ended up rolling my own since we didn't need full functionality anyways. And this was for an internal app, at Apple ┐( ∵ )┌
- logical42 5y agoIt's possible in Java.
- mattnewton 5y agoRight, because the language has the "million dollar mistake" of nullable references by default, which you cannot change without breaking code. And the original comment was bemoaning that Go choose to to have nullable references by default too.