5 ms·
There is the project Valhalla now, https://wiki.openjdk.java.net/display/valhalla/Main https://wiki.openjdk.java.net/display/valhalla/Main, aiming to bring valu
by JanecekPetr 7y ago
There is the project Valhalla now, https://wiki.openjdk.java.net/display/valhalla/Main https://wiki.openjdk.java.net/display/valhalla/Main, aiming to bring value types and eventually generic specialization and reification.
The work on that project has been impressive, and there is now an experimental EA build called LW2 where you can play with value types: https://wiki.openjdk.java.net/display/valhalla/LW2 https://wiki.openjdk.java.net/display/valhalla/LW2
Will this solve everything? No. The char type is hosed. But there will be an opportunity to e.g. get a new Character.
- MrBuddyCasino 7y agoTo anyone looking: it seems as if the project is dead since 2015, but the prototype is in active development. Thanks for the link!
- JanecekPetr 7y agoThank you, I updated the link in my post to point to the up-to-date and frequently updated wikui page for Valhalla information.
- nullwasamistake 7y agoAnother option, now that MS open sourced .NET core, is to use C# They learned from Java's terrible sins. Features include value types (you can even use them as generic params!) And no type Erasure. Besides massive improvements the language is nearly identical to Java. Only reason I'm still in Java land is the huge ecosystem.