Y
Hacker News
new
|
ask
|
show
|
jobs
by
zvrba
1750 days ago
> Note that in Kotlin the return type is `Int?`, not `Int`.
How does that fare with unnecessary boxing of primitives?
1 comments
kreetx
1750 days ago
If the function isn't total (as in: for every string there is an int) then the boxing is necessary, no?
link
zvrba
1750 days ago
Not if you have user-defined value types (soon coming to Java).
link