Hi all,
Why Kotlin Any type has only 3 methods equals, hashCode and toString. While standard Java Object type has some additional ones like wait/notify
n
nfrankel
07/24/2021, 10:46 AM
wait()
and
notify()
are legacy ways to do thread synchronization
they have nothing to do with
Object
it just happens that since every instance traces its ancestry to
Object
, it was the right place to put them
but thread sync is a cross-cutting concern
and not everything needs to be object-oriented
kotlin’s