In Kotlin, starting from version 1.5, direct conversion to Char for Double and Long types has marked as deprecated, and it is recommended to invoker the following toInt().toChar() a chain of functions to convert Double/Long to Char.
What prompted the Kotlin developers to abandon the direct conversion to Char for Double and Long types?
What issues can this approach avoid?
fun main() {
val l = 100_000_000_000 // random big number
val d = 1.2543534645645362E15 // random big double
var chUsedDirectToChar = l.toChar()
var chUsedToIntToChar = l.toInt().toChar() // the same
println(chUsedDirectToChar == chUsedToIntToChar) // true
chUsedDirectToChar = d.toChar()
chUsedToIntToChar = d.toInt().toChar() // the same
println(chUsedDirectToChar == chUsedToIntToChar) // true
}