Hi all, TIL that Kotlin supports bitwise operatio...
# stdlib
h
Hi all, TIL that Kotlin supports bitwise operations on Bytes and Shorts, but the operators live in the
kotlin.experimental
package… but they’re not marked or documented as experimental. These were added all the way back in Kotlin 1.1. In fact, these are the only functions in that package. I assume they were experimental at some point, but is there a reason these functions haven’t been added to the root package and the current ones deprecated? It seems like something that should have been done a long time ago, unless I’m missing something. https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.experimental/and.html https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.experimental/or.html (Also see https://kotlinlang.slack.com/archives/C0B8Q383C/p1745618322294649)
c
Ahah I thought I had seen this discussion before
i
I've created a task to move these operations to the kotlin package and stabilize them: https://youtrack.jetbrains.com/issue/KT-87122/Stabilize-bitwise-operations-for-Byte-and-Short
🙏 1
thank you color 3