Hacker News new | ask | show | jobs
by xonix 885 days ago
Nice.

Once I did some experiments at programming in Java using only sun.misc.Unsafe for a memory access: https://github.com/xonixx/gc_less. I was able to implement this way basic data structures (array, array list, hash table). I even explicitely set a very small heap and used Epsilon GC to make sure I don't allocate in heap.

Just recently I decided to check if it still works in the latest Java (23) and to my surprise it appears - it is. Now, apparently, this is going to change.

1 comments

It won’t change for many many years to come. It becomes deprecated, which just gives you a warning.
Since Java 9, deprecations are actually removed, after a couple of LTS releases.
A couple of LTS releases is 2*n years, though.
The planned releases for removal are listed on the JEP.

If they fail to provide parity, people will do like with modules, keeping holding to older Java versions longer than they should, use the escape command line options if available, turn back to JNI (the opposite this is trying to achieve), or move to other stack if they aren't that dependent on Java, e.g. ongoing Kafka ecosystem evolution.