Hacker News new | ask | show | jobs
by creyer 3394 days ago
What "better java" means? It means I can build the same stuff but in a better way. Easier to read, to maintain, and at least with the same performance. Scala has a big plus on asynchronicity, but the article doesn't even try to go there. Libraries like Akka, FS2, Monix, ScalaZ etc are not mentioned either. In Scala I can use everything from Java and much more, and this is why is better.

I'm sure by tomorrow someone with more time than I have will write an extensive article explaining in more detail why is better.

2 comments

A "better Java" means keeping the same concepts and paradigms as Java, but fixing some of the design issues. That's what Kotlin is.

Scala on the other hand is a completely different beast, but some people use is as "a better Java" because it doesn't force you into its paradigms. You can code in Scala without using case class, with var everywhere, etc.

It can be handy to fallback to "Java style" when you don't know how to do it in idiomatic Scala, but at the end of the day if you don't want to embrace the key paradigms of Scala it's better to use a different language.

> In Scala I can use everything from Java and much more, and this is why is better.

You can use everything but it's not always very nice. For instance one of my biggest source of frustration is dealing with XML and SOAP (yes I know...) Scalaxb is good but limited, and using Java libraries means dealing with Java POJOs. I can definitely see Kotlin's potential in the "perfect Java interop" space.

That said, I agree with you, and I enjoy those high-level libraries too much to switch back to a less powerful language.