54 points · by Alupis · 3y ago · 36 comments
> In the future, in a Valhalla-capable JVM, JVM primitive classes will enable efficient representation of Kotlin value classes with an arbitrary number of underlying fields on JVM.
AFAIK equals() test for equality not identity in Java.
In an ideal world, == would test for equality. In a worse world, equals() would test for equality. But we live in a Java world: Equals() is predefined as an identity check on Objects, and it's up invididual implementations to override that check with something better.
Also lets not forget that Java (even if in a different flavour), powers 80% of mobile phone market, that power alone wasn't enough to keep Windows Phone going, mostly written in C++ anyway (COM/WinRT).
Or the real time Java implementations used by the military, like PTC.
JNI is an abomination and a cautionary tale for everyone implementing interop facilities into their language.
https://www.ptc.com/en/products/developer-tools/perc
https://www.aicas.com/wp/products-services/jamaicavm/
And to 80% market share in mobile OS market, full of JNI all over the place.