Live data from Hacker News

New language features since Java 8 to 17

advancedweb.hu

71–80 of 358 posts

Re: New language features since Java 8 to 17

#71

Earlier quoted context omitted.

Scala is fine. People understood it's not really worth it as a "better Java". Companies that choose Scala in 2021 are using either big data frameworks (where Python bindings are the most common alternative to Scala, not Java), or functional ecosystems (Typelevel, Zio). Scala 3 has taken an interesting direction and to me it seems that Odersky wants to win Python developers over rather than Java shops using Spring. Ne…

Which is a bummer for folks that loves the cleanliness and power of "basic Scala" (pure functions, immutability) without wanting to get into deep FP theory (typelevel, zio). That has been a really nice pocket to be in for teams that have the discipline to not get clever with it. Same with teams wanting to integrate with Akka on scala.

I think between Scala 3 and the Li Hayoi ecosystem, there is a path to simplicity. But that usually means you lose part of the appeal of the language, since you can't use some parts of the ecosystem.

Re: New language features since Java 8 to 17

#72
post #2

Unfortunately 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.

Kotlin is still run by the company that makes the best Java ide, no? I don't expect kotlin to get pushed out so easily.

Re: New language features since Java 8 to 17

#73

Earlier quoted context omitted.

Scala is fine. People understood it's not really worth it as a "better Java". Companies that choose Scala in 2021 are using either big data frameworks (where Python bindings are the most common alternative to Scala, not Java), or functional ecosystems (Typelevel, Zio). Scala 3 has taken an interesting direction and to me it seems that Odersky wants to win Python developers over rather than Java shops using Spring. Ne…

Which is a bummer for folks that loves the cleanliness and power of "basic Scala" (pure functions, immutability) without wanting to get into deep FP theory (typelevel, zio). That has been a really nice pocket to be in for teams that have the discipline to not get clever with it. Same with teams wanting to integrate with Akka on scala.

Zio is pretty much what you want. No need to understand category theory, no over-reliance on implicit resolution, ...

That said you don't need to understand that much to use high-level libraries in the Typelevel ecosystem. And when I do need to reach for low-level constructs, I find nice that everything is built upon clean and composable abstractions.

You mention Akka, it's kind of its own beast. The inner workings go definitely way beyond "better Java", yet Lightbend needs to provide a surface API that plays nice with Java interop. It's not an ecosystem easy to navigate in my opinion.

Re: New language features since Java 8 to 17

#74
post #70
post #36

Earlier quoted context omitted.

Android will always be Kotlin-first. That's a pretty huge market.

Android used to be always Java first. It could change again.

Most likely to Flutter. When Google will be ready to ditch Android API.

Re: New language features since Java 8 to 17

#75
post #2

Unfortunately 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.

I don't think this is going to happen with Brian Goetz as language architect. He refuses to add many features that would address everyday pain points such as: * 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 collection…

He does not refuse, but needs to look at bigger picture.

Some features are low hanging fruit, some are proposed small changes that actually should be defined a bit differently to be better and they will take more effort.

But even small hanging fruits means that they need to chose which ones to do. Should they delay pattern matching by 6 months to get elvis operator? I wouldn't like it, pattern matching is more important.

Basically they have limited resources and have to chose what to work on.

Re: New language features since Java 8 to 17

#77
post #26

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.

Shameless plug: I recently wrote a blog post on Java 17's new features using the implementation of a tiny actor runtime as the running example. If you are interested you can find it here https://evacchi.github.io/java/records/jbang/2021/10/12/lear...

Re: New language features since Java 8 to 17

#78
post #2

Unfortunately 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.

Scala is fine. People understood it's not really worth it as a "better Java". Companies that choose Scala in 2021 are using either big data frameworks (where Python bindings are the most common alternative to Scala, not Java), or functional ecosystems (Typelevel, Zio). Scala 3 has taken an interesting direction and to me it seems that Odersky wants to win Python developers over rather than Java shops using Spring. Ne…

Kotlin started out as a better Java but it's more than that now. With Kotlin multiplatform you can compile to JVM, Javascript and Native from the same repository.

Java has been catching up on language features but I'm not sure if I'm ready to switch back to Java for Spring projects yet. Mostly because of nullability, extension methods and coroutines in Kotlin.

Re: New language features since Java 8 to 17

#79
post #76

Is there something similar for Python? They are releasing new Python standards with a crazy fast speed. Would be really helpful for me.

It would sure be helpful if they took some effort to focus less on adding crazy new stuff every 2 days and instead on maintaining older versions for a change.

Maintaining a python dependant system these days is an absolute nightmare, at least with C++ you know that new compilers will be backwards compatible, gah.

Re: New language features since Java 8 to 17

#80
post #76

Is there something similar for Python? They are releasing new Python standards with a crazy fast speed. Would be really helpful for me.

It would sure be helpful if they took some effort to focus less on adding crazy new stuff every 2 days and instead on maintaining older versions for a change. Maintaining a python dependant system these days is an absolute nightmare, at least with C++ you know that new compilers will be backwards compatible, gah.

How does this feel with Python being dynamic? I always felt very uneasy writing Python precisely because if some random module became incompatible, especially via a transitive depndency, I might not find out until it was running in production.
Post reply on HN