https://kotlinlang.org logo
#announcements
Title
# announcements
j

jkbbwr

10/14/2017, 5:40 PM
Why is there no unisgned short in kotlin
k

karelpeeters

10/14/2017, 7:35 PM
Probably because it doesn't exist in Java either? You can pretend it's unsigned if you create your own toString, compareTo and factories of course ☺️.
j

jkbbwr

10/14/2017, 7:36 PM
Grim 😕
g

gildor

10/16/2017, 1:12 AM
There are plans from Kotlin Team to implement unsigned types https://discuss.kotlinlang.org/t/when-does-bit-fiddling-come-to-kotlin/2249
j

jkbbwr

10/16/2017, 9:00 AM
But if the JVM doesn't support them then what can you do to make it efficient?
g

gildor

10/16/2017, 9:37 AM
It’s important feature for kotlin/native, but not sure how they will be supported on JVM. Maybe it will be possible to implement when inline classes will be available. You can ask about possible implementation in this thread on discuss.kotlinlang.org
3 Views