Why is there no unisgned short in kotlin
# announcements
j
Why is there no unisgned short in kotlin
k
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
Grim 😕
g
There are plans from Kotlin Team to implement unsigned types https://discuss.kotlinlang.org/t/when-does-bit-fiddling-come-to-kotlin/2249
j
But if the JVM doesn't support them then what can you do to make it efficient?
g
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