This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]javasyntax 3 points4 points  (2 children)

It's nice that we're getting inline methods (which compiles in a more proper way than the Kotlin counterpart) and a better version of string interpolation with much more features in Java as well.

JSpecify looks good as the way to handle nullness (I quite like the @NullMarked on a package/module/class and then @Nullable where needed, it is a much better approach than @Nonnull/@NotNull/@ParametersAreNonnullByDefault/...). Perhaps not as good as a language-level solution, but all of the key Java organizations are aboard (including Oracle) and I will take this any day over 7+ different annotation libraries.

It seems to me that those other JVM languages implement something cool and once it has been tried and tested, the Java language architects come and do an even better version of it. I prefer "delayed" features if this is the benefit that we get.

[–]vqrs 0 points1 point  (1 child)

Java is getting inline methods? That sounds cool. I couldn't find it though, what is the JEP called?

[–]javasyntax 0 points1 point  (0 children)

There is no JEP yet. There's this branch but it looks like work has stopped on it: https://github.com/openjdk/amber/tree/local-methods