Scala 3 is not production ready
gvolpe.com
gvolpe.com
> Although some features are still missing, I absolutely love Scala 3 and promote its usage in production
That's the precise opposite of the message of the title. That's a bit annoying and makes me feel like I'm being hoodwinked.
a) migrate their production server to a new language for a weak reason
b) learn new syntax when the old one works fine
I am sure Scala 3 is great but I see no reason to learn it. The constant change with Scala with only slight performance improvement doesn’t make me excited. I would rather spent my time learning Rust.
Java's ABI is far more stable.
It's great to see Java finally starting to move again, but frankly if you think "modern Java" is good then you could've had all that for 15+ years with Scala - why do you want to wait 15 more years for the other half of what Scala offers?
First, Project Loom was announced in late 2017 [1]. So I don't really understand where you get that decade from? Second, it is available as a preview feature in latest JDK. Why would people adopt a preview feature in their production systems? A lot of frameworks have already added support or as a minimum started working on support for virtual threads. I'm sure all major frameworks will support them once they are out of preview.
[1] https://cr.openjdk.java.net/~rpressler/loom/loom/sol1_part1....
I might've been mixing them up with value types. Or I may have been thinking of an earlier effort that was then subsumed into Project Loom.
> Second, it is available as a preview feature in latest JDK. Why would people adopt a preview feature in their production systems?
Exactly my point. If someone is arguing "I don't need Scala's support for lightweight concurrency because modern Java has that" - well, it sort of does, but they're not actually production ready.
> A lot of frameworks have already added support or as a minimum started working on support for virtual threads. I'm sure all major frameworks will support them once they are out of preview.
This is purely speculative, but I think there are going to be a lot of unforseen bugs and edge cases when people start actually using them. So I think it's really important to be clear that they're not in actual production use at the moment.
Your 3 states
But now that it's modern, and it's moving quickly... I see less and less need to use these "better Java" languages.
It’s still good old verbose Java. But the entreprise Java insanity is over and other stuff than spring emerge ( Java Lin for instance )
Functional programming is still cumbersome. Having a map of <enum,function> for instance requière some googling and weird syntax.
But it’s possible. Getter/setter are gone. Immutable records replace them.
Next version the thread model gets an update. No more system thread. So spawning them carelessly will be possible ( ala Coroutine in go)
Also, Java IDEs are still the best imo, so I wouldn’t be surprised if in fact you would type less for equivalent Java programs than in case of a much less verbose language sheerly due to the killer autocomplete.
Probably wise to switch to Java or Kotlin where there is growth.
Yes, some of my fellow engineers like it for the language itself, but I feel these days it's getting harder to argue that "the team using Kotlin is so much more productive than the team using Java".
Curious what HN thinks about this.
Kotlin has (real, language-level) non-nullable references, which strikes me as a big improvement.
If you do some long, chained property accesses (which imo are the primary sources of NPEs) I can only recommend mapstruct. You basically declaratively write what has to be mapped to what and it will generate at compile-time the necessary, performant Java code with proper null-handling, even n level deep.
So my empirical evidence is that NPEs ”million dollar” fallen victim of inflation :D
But with Java on a faster release schedule the point of Kotlin gets weaker every day.
Scala on the other hand is more and more a true FP language.
Yet, when you inevitably have to add something more complex, it will let you do it. Gradle is perhaps one of the most misunderstood technologies, many people believe it is some imperative ant-script, when in fact you have the script write a declarative plan for you, which will be later executed “purely” (much more so than maven for example)
One thing was that while iterating on the build was painful compared to Gradle with Kotlin script it did have very nice performance in combination with remote build cache and I imagine the remote build execution feature could be very nice for large JVM projects.
No, "list map function" is not as readable as "list.map(x => function(x))". Anyway.