2 ms·
Primitive types are placed on the stack, as are those classes proven to not escape current scope, thus not everything. When Valhala is finally merged, then val
by pjmlp 2y ago
Primitive types are placed on the stack, as are those classes proven to not escape current scope, thus not everything.
When Valhala is finally merged, then value class and value record will also not be on the heap by default.
Finally, even without Valhala, Unsafe and Panama allow for off heap allocation, thus again, not everything.
- DarkNova6 2y agoYou are correct, I was oversimplifying to get the point across. Valhalla is one of the most promising upcoming technologies I am anticipating, but I don't expect it to change the approach to writing most Java programs. What makes Java so good is that it is a language written for creating high quality libraries and frameworks. Sure, it will be nice to define your own zero-cost classes but the largest benefit will stem from improved an standard library as well as an enabler for high-performance programming and GPU access.