
Kotlin 2.4.0, an update to JetBrains’s statically typed language for building JVM, native, Wasm, and web applications, introduces experimental improvements to compile-time constants, making support for numeric and string types more consistent and easier to use, JetBrains said.
Kotlin 2.4.0 was released June 3. Its experimental improvements to compile-time constants include support for unsigned type operations; standard library functions for strings, such as the .lowercase(), .uppercase(), and .trim() functions, and evaluation of the .name property of enum constants and the KCallable interface. To make it clear which functions are evaluated at compile time, Kotlin 2.4.0 introduces the IntrinsicConstEvaluation annotation.
JetBrains warned that some functions are evaluated at compile time but do not have the annotation yet. Later releases will add the annotation to the remaining functions.

