Most of which unavailable on Android Java flavour, sorry Google's J++.
If you're on Android I'd be programming in Kotlin in any case.
New language features since Java 8 to 17
51–60 of 358 posts
Re: New language features since Java 8 to 17
#52Re: New language features since Java 8 to 17
#53Missing var in java 9?
https://advancedweb.hu/new-language-features-since-java-8-to...
Re: New language features since Java 8 to 17
#54Whenever we read about new improvement in Java,it is always inevitably followed by concerns for viability of Kotlin or Scala. However these concerns are never applicable for Closure. I am glad I went all in on Clojure.
Re: New language features since Java 8 to 17
#55Re: New language features since Java 8 to 17
#56Earlier quoted context omitted.
To be honest I see Kotlin continuing to exist because of it's multi-platform nature and it's focus being on different things to Java. So even if feature wise the 2 equalize (a good thing not a bad thing IMO) stylistic differences will remain. Many of Kotlins syntactic differences are unlikely to make it to Java for instance. I'm ok with this. I use both for different things. Kotlin for most app level development, Kot…
Hmm yes I guess you might be right given Android. It's a shame in a way that Kotlin was invented as Scala could have filled the niche too imho but that ship has sailed. It's too similar to both Java and Scala and doesn't really bring anything new to the table. Is that fair or does it have a great USP other than massive Google backing?
The truth of it is that Kotlin is incredibly easy to learn, even for non-Java devs. It is definitely focused on a very low barrier to entry. I don't think this was an original goal but it's become a significant focus of the language especially after being selected to be the next platform language for Android.
This isn't true of Scala at all. Beyond things like SBT, comparatively poor IDE support (less of an issue these days) it is also just a very complex language, with many complicated semantics in it's standard library and even more complex/fancy 3rd party libraries piled on top of that.
Scala became an incredibly powerful language, not a simple or easy to use one however.
Kotlin is a very user friendly language that is easy to learn but still has enough power to keep most expressiveness focussed devs happy.
Beyond the learning curve Kotlin integrates with Java a lot better, calling in both directions.
These 2 factors alone probably account for why it was chosen over Scala for Android and in general why it has value over both Java and Scala.
I think with Gradle moving from Groovy -> Kotlin, Android obviously and big companies adopting Kotlin w/Spring on the backend the ship has indeed sailed for Scala, it doesn't really have a place outside of places that specifically want a more FP lang.
Re: New language features since Java 8 to 17
#57Earlier quoted context omitted.
Because plenty of people judge Java by their pre-Java 8 frozen knowledge. At least it isn't yet another link to re-written in Rust headlines.
I must be in the minority of thinking java 7 was the last great version of Java. What I see today is a nearly different language.
Re: New language features since Java 8 to 17
#58Missing var in java 9?
> Available since: JDK 11 (Without lambda support in JDK 10)
TOC is missed up, there is no java-10 at all.
Re: New language features since Java 8 to 17
#59Unfortunately it looks like Java is going to evolve enough to take the wind out of the sails of Kotlin and Scala for most dev shops. I guess the positive take is that those improvements might not have happened without the efforts to develop better JVM languages.
* null safe navigation operator
* properties
* mutable records
* a way to ignore checked exceptions (or at least having the stream API take functional interfaces that can throw exceptions)
* adding functional methods like .filter()/.map() directly to collections instead of having to .stream().map(..).collect(toList())
Re: New language features since Java 8 to 17
#60Unfortunately it looks like Java is going to evolve enough to take the wind out of the sails of Kotlin and Scala for most dev shops. I guess the positive take is that those improvements might not have happened without the efforts to develop better JVM languages.
New features in Java and the JVM (records, loom, valhalla, ...) are directly going to benefit Scala and make it even better.
On the contrary, Kotlin's essence has always been threatened by the fact it's nothing more than a better Java. I assume there's still a big demand for that on Android, but if you're running on a recent JVM, I would certainly consider Java over Kotlin.