Java 22 Released
21–30 of 178 posts
Re: Java 22 Released
#22Foreign Function Interface is one of the key advantages what C# had over Java (e.g. against huge APIs like Android or macOS). I am really curious how this JEP turns out.
I started to tinker with this new API last week. I definitely think it's a lot better than needing to self compile a lot of the bindings yourself which will certainly bring more from the community into the feature than were here before. That said, you really need to write a bunch of boiler-plate to implement useful things in java-like paradigms in the library today. Just as an example, I wrote up a sane windows _getc…
Re: Java 22 Released
#23Earlier quoted context omitted.
Calling Android "Java" has always been a stretch. Not only has Android never been compatible with any version of Java, the divergence between Android and Java is only growing. JDK 22 is Java; Android is Android.
That is true, for all intents and purposes however the glue code to (insufficiently) reduce marshalling and FFI overhead is written in Java the language, even if it does not use OpenJDK.
Re: Java 22 Released
#24Interesting to see the developments on the String Templates API using the STR and fmt template processors.
It gets interesting: https://mail.openjdk.org/pipermail/amber-spec-experts/2024-M...
TIL the past participle of 'bikeshed' is 'bikeshod'. Tremendous.
Re: Java 22 Released
#25Re: Java 22 Released
#26Foreign Function Interface is one of the key advantages what C# had over Java (e.g. against huge APIs like Android or macOS). I am really curious how this JEP turns out.
The FFI is also an artifact of CLR type system and the ability of have proper stack value based types.
Re: Java 22 Released
#27Earlier quoted context omitted.
That is true, for all intents and purposes however the glue code to (insufficiently) reduce marshalling and FFI overhead is written in Java the language, even if it does not use OpenJDK.
Okay, but we're not talking about OpenJDK but about Java, a specification -- not an implementation like the OpenJDK JDK -- that Android has never conformed to and from which it is only growing further apart. I.e. the OpenJDK JDK is an implementation of Java; Android is not (there certainly may be some Java code that happens to behave the same way on Android, but it is not, and has never been, the case for Java code g…
Re: Java 22 Released
#28Earlier quoted context omitted.
"Vector API" is universal api for SIMD. It will probably remain in incubator until valhalla delivers value types.
Is there a timeline on Valhalla? I only loosely follow the Java ecosystem these days, but Valhalla is of particular interest to my performance-oriented mind.
That being said, the amount of rigor with which the JDK devs test their experiments is really something to witness. Its equivalent to old school MS with painstaking maintenance at backwards compatibility, all the while moving the wheel of progress.
Every single change so far has been planned with a decade of advanced planning because that's just how this ecosystem roles.
Re: Java 22 Released
#29For me personally the most interesting one is JEP461 (Stream Gatherers) https://openjdk.org/jeps/461
This will allow addition of interesting stream operations.
Re: Java 22 Released
#30Foreign Function Interface is one of the key advantages what C# had over Java (e.g. against huge APIs like Android or macOS). I am really curious how this JEP turns out.
But the ugliness of JNI stopped me. Then I tried FFI in Java 21, with jextract it was amazing.
I wasn't aware of FFI at first, but the finalized version of virtual threads made me check the Java release notes.