Scala is more complex than Java? Think again…


I’ve read yet another blog saying in so many words the same thing: Scala is just more complex than Java.

Enough has been written about it but I just want to mention two trivia facts that I always bring about when I speak about GridGain and Scala:

  • Scala has less “reserved words & symbols” than Java. Actually, almost 20% less (!)
    (make sure to count symbols as well in both languages)

  • Scala has only… 6 control structures. Yes – only 6 and here they are:
    • if
    • for
    • while
    • try
    • match
    • function call

    That’s it.

Point 2 usually sets people off. “How come?” – they ask. With all the perceived “complexity” and everything – we actually have the language that has less keywords than Java and only 6 control structures…

The reason is actually “hidden” in the name itself. Scala stands for Scalable Language and it shows clearly in how Scala the language can scale from very simple core to a language with one of the most advanced features today.

So, the language is not complex. Changing the way you think about algorithms – may take a while but it will be so much worth it.