11 ms·
> How do you feel about Kotlin where nulls are present but by default all types are not nullable? I have to ask--how is that different from an option type?
by ddellacosta 4y ago
> How do you feel about Kotlin where nulls are present but by default all types are not nullable?
I have to ask--how is that different from an option type?
- KMag 4y agoI think the GP is probably thinking about Java's Option<T>, which adds an extra layer of indirection and is in some ways the worst of both worlds. In Java, the Option<T> could be null, or it could wrap null. The clue here is that the GP is talking about extra boxing/unboxing related to Option<T>, which you don't get in languages with better Option<T>/Maybe<T> implementations.