Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Scala is clearly the best all-purpose weapon on the JVM. Scala can do everything Java can do, and almost always Scala can do it better (with very good interoperability to Java), so IMHO there is no good reason to consider Java at all for a new project.</p> <p>There are a few cases where dynamic typing (JRuby, Jython, Groovy) or meta-programming features (Clojure) can give you an initial edge, but there is nothing else that scales as good as Scala, and which gives you the freedom to mix paradigms as you need it, so as bigger as a project gets, as bigger gets the advantage of using Scala.</p> <p>[Update] In response to the questions:</p> <ul> <li>Yes, finding Scala programmers is harder than finding Java programmers, but it is very likely that you get better people. Of course not because all Java programmers are bad, but because most Scala programmers were good Java programmers who felt too restricted by the limitations of the Java language. </li> <li>Erlang is a great language, especially the Actor concept. Scala followed this example, so you have now several Actor frameworks available on the JVM (to be fair, Akka has both a Scala and a Java interface). However Erlangs type system seems very simple (e.g. no type polymorphism), IMHO too simple for some complex structures. Of course everybody envies Erlangs ability for hot code swapping, but I guess this can't be emulated without fundamental changes on the JVM (or .NET)</li> <li>It's hard to say which features are the most important ones, because there are so many, but I'll try to name some highlights: Scala can do most things functional languages can do (see e.g. the Scalaz library) except macros (which are less useful if a language isn't homoiconic). The integration of functional and OO features is tighter than in any other <em>mainstream</em> language (I know, there is Beta, Self, IO, Ioke, Bla...), which generates a lot of synergy. Scala's type system may look intimidating at first, but the scary stuff is mostly needed to build libs and DSLs (another area where Scala is much better than Java): Scala has Higher Order Types (like Haskell), which is a powerful concept we just begin to exploit. Implicit Conversion is an incredible useful and flexible tool, which allows the emulation of type classes and other magic. Abstract Type Variables are a sometimes very useful alternative to Parametric Types. Pattern Matching is functional folklore, but works excellent for OO, too. Type inference (although not as good as Hindley-Milner) mitigates the burden of having a static type system, making the language very "scripty" without sacrificing type safety.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload