Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> we want the JVM to be able to treat them as efficiently as primitives.

They want basically to solve the main Java design flaw with (almost) everything is a reference paradigm. C++ and Rust have had value-types from day one.

> 64 bits, including the null flag

So, this basically makes every value-object optional, adds extra overhead and makes code less safe to null pointer dereference errors.

> but a class with, say, two int fields or one double may not fit in an atomic write and end up as an ordinary object on the heap anyway

So, the whole optimization is applied only for very small structs with no more than two scalars (or so). Did it worth to spend 10+ years of development to achieve this?



That's like going to a steak bar and saying that this place sucks after the pre-dinner snacks.

Java JEPs are piecemeal, there is plenty other JEPs building on top.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: