Hacker News new | past | comments | ask | show | jobs | submit login

>Java is actually very memory efficient, all things considering

That makes me wonder about your universe of things to consider. Java's terrible memory usage was set in stone the moment they decided not to include structured value types.




Besides being planned for Java 10, there are AOT and JIT compilers for Java that are able to convert simple Java types that follow a specific value pattern into value types.

An example would be how the IBM J9 JIT converts a final Point class, just with getters and setters into a value type.

Also there are language extensions from JVMs like IBM Packed Objects or Azul Object layouts that are exploring how to involve the language into value types.

It sucks that they didn't follow the route of Mesa, Modula-3, Eiffel and Oberon in regards to value types, but they aren't holding still.


If the compiler can prove that an object is final and immutable and is never used in any other context that requires reference semantics, it could potentially use that optimization.

But then you also need data structures that can be parameterized to store such value objects as values. Otherwise you're back to square one.


Which is the point of IBM and Azul's research.


Value Types are being worked on now for Java 10+.

https://en.wikipedia.org/wiki/Project_Valhalla_(Java_languag...

The Java language is definitely not set in stone.


No, the Java language is not set in stone. Its terrible memory usage is set in stone as long as the language doesn't have value types.

If (and that's a big if) they introduce value types in 2018, it will have been almost 25 years since that fateful decision that has done so much damage.


While it sucks that Java does not support value types like other GC enabled languages, apparently Go owner's are fine with that decision, to the point of fighting to keep using it on their products instead of replacing it with Go.


That's like saying you're fine with every decision taken by a government you voted for.

Go owners have millions and millions of lines of existing Java code and they employ many people whose entire careers were made on top of Java.

I'm not saying there are no rational reasons to prefer Java over Go. But Google is hardly the yardstick for that.


With >3 years release cycle by mid 2017 we are hoping to get Java 9 so to me Java 10 seams 2020 at the earliest.




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

Search: