You know how Java splits everything into primitives and reference types and you can only create the latter?
Get ready to have that worldview shattered! ๐๐ฅ๐ฃ๐งจ
Out of Project Valhalla comes Java Enhancement Proposal 401.
It proposes a distinction between 1๏ธโฃ primitive class and 2๏ธโฃ identity classes, both can be created by us developers.
1๏ธโฃ Instance of the former, called primitive objects, will have no identity but the potential of the same performance and memory benefits as today's primitives. ๐
2๏ธโฃ Instances of the latter, called identity objects, behave like today's class instances.
This JEP is not โ yet targeted ๐ฏ for a release, so we don't know which Java version will eventually contain ๐ฎ.
#java #primitive #class