Search code examples
scalaprogramming-languages

Debunking Scala myths


What are the most commonly held misconceptions about the Scala language, and what counter-examples exist to these?

UPDATE

I was thinking more about various claims I've seen, such as "Scala is dynamically typed" and "Scala is a scripting language".

I accept that "Scala is [Simple/Complex]" might be considered a myth, but it's also a viewpoint that's very dependent on context. My personal belief is that it's the very same features that can make Scala appear either simple or complex depending oh who's using them. Ultimately, the language just offers abstractions, and it's the way that these are used that shapes perceptions.

Not only that, but it has a certain tendency to inflame arguments, and I've not yet seen anyone change a strongly-held viewpoint on the topic...


Solution

  • Myth: Scala supports operator overloading.

    Actually, Scala just has very flexible method naming rules and infix syntax for method invocation, with special rules for determining method precedence when the infix syntax is used with 'operators'. This subtle distinction has critical implications for the utility and potential for abuse of this language feature compared to true operator overloading (a la C++), as explained more thoroughly in James Iry's answer to this question.