Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

As someone suggested earlier, Scala is probably the best option for a Java developer looking for an alternative. Runs in the JVM, is compatible with Java programs, mixes OOP and functional programming. It can be summarized as "Java meets Haskell".

What I found liberating in Scala is a simple proposition: "use OOP when it makes sense, and functional programming when it makes sense". It's wonderful when you don't have to reason about everything using the OOP lenses and you get to choose, very empowering.

Your criticism to Scala in the other comment seems to amount to "it's not Java", which is extremely weak as an argument. If you are looking for an exact duplicate of Java, then just use Java. Scala is more complex than Java, certainly, because it gives you more options and also because it has a way of rewarding those who master the language. And "ugliness" is a completely subjective matter, I find Java with all its boilerplate ugly and not Scala, for example.



> Your criticism to Scala in the other comment seems to amount to "it's not Java"

It amounts to "Scala is too complex, ugly and slow to compile."

Yammer moved from Scala to Java BTW: http://blog.joda.org/2011/11/real-life-scala-feedback-from-y...

My ideal language would be some mix of Kotlin, Ceylon, Dart and Julia.


You are just taking one data point and assuming it proves something other than Yammer had problems with Scala. Check this list of companies using Scala: http://www.scala-lang.org/old/node/1658.html

Some examples: Twitter, LinkedIn, Foursquare. All of them pretty big and in the same space of Yammer; they seem quite happy and don't plan to move away from Scala.

And here you can find a clarification from Yammer about that issue: http://eng.yammer.com/scala-at-yammer/

TL;DR: They liked Scala but it has rough edges, every programming language has rough edges (yes, including Java). They found Scala was not the best option for some particular situations and Java was a better fit. End of story.

That's fine and completely reasonable, I think nobody said Scala is the Holy Grail in programming languages. As for your preference, you seem to be looking for a "nicer than Java, but OOP all the way" (don't know about Julia, haven't used it), which is OK as a preference but many of us find it a kludge to work with. I found something like Scala (multi-paradigm, I mean) helps me a lot in reasoning about code. As I said, you use the paradigm that makes more sense.

For complexity and ugliness, you have my previous answer. About compile time, you have a sophisticated type system and type inference which come at a cost, but it's not such a big deal when you run it with fsc (which stands for fast scala compiler).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: