https://kotlinlang.org logo
m

Marc Knaup

10/17/2020, 5:53 PM
Is there a multiplatform identity hashmap? Or any way to get an internal unique ID for an object in JS? On JVM there is
System.identityHashCode(…)
and on native there is
Any?.identityHashCode()
.
🤔
s

streetsofboston

10/17/2020, 6:25 PM
The link https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.native/identity-hash-code.html shows me it’s available for common (and jvm, js and native)
m

Marc Knaup

10/17/2020, 6:26 PM
The design is very misleading. There’s an extra blue dot at the function itself:
m

Marc Knaup

10/17/2020, 6:58 PM
Thanks Is the
defineProperty
really needed? 🤔
a

Arkadii Ivanov

10/17/2020, 7:02 PM
Maybe not, I derived this code from SF))
m

Marc Knaup

10/17/2020, 7:03 PM
👌 😄
3 Views