3 ms·
Note that in Kotlin the return type is `Int?`, not `Int`. You can't forget to check for null because the compiler enforces it. To your first point: Another exa
by dthul 5y ago
Note that in Kotlin the return type is `Int?`, not `Int`. You can't forget to check for null because the compiler enforces it.
To your first point: Another example in the design space would be Rust which works very similarly to Kotlin but returns more information in the failure case.
- zvrba 5y ago> Note that in Kotlin the return type is `Int?`, not `Int`. How does that fare with unnecessary boxing of primitives?