What is wrong with Scala

This is part of a series of posts in which I am documenting what is wrong with certain popular programming languages that I am (more or less) familiar with.  The aim of these posts is to support a future post in which I will be describing what the ideal programming language would look like for me.  

I will be amending and revising these texts over time.

(Useful pre-reading: About these papers)

What is wrong with Scala:

  • The garbage collector.
  • Curly braces.
  • Functional Nazism
    • It is true that Scala does not suffer from functional Nazism as much as other functional languages, but it still has some entirely unwarranted requirements and limitations that seem to have no purpose other than to hinder imperative programming:
      • Cannot reassign method parameters.
      • No for-loop the way we know it.
  • Functional weirdness
    • Some language idioms may seem entirely natural to functional programming aficionados, but disciples of the imperative school tend to find them rather upsetting:
      • The ability to return the last evaluated value without an explicit return statement sometimes makes it hard to tell what will actually be returned by a function.
  • Incredibly complex syntax
    • Results in torturously slow compilation.
    • "look ma, no semicolons" adds nothing of tangible value, but it does make things very difficult for the compiler.
    • A compilation unit often becomes entirely unparseable from top to bottom just because of a single-character syntax error at an unknown place somewhere in it.
  • Arcane syntax
    • Generics use square brackets instead of angle brackets.
    • Ultra-compact generic type bound specifications are probably very convenient for the seasoned Scala programmer, but a severe deterrent for the newcomer.
  • Companion objects feel entirely superfluous and clunky.
  • Inelegant language keywords like `def`, `var`, `val`.
  • Inelegant built-in collection class names like `Seq`.
Note: the above list of disadvantages is kind of short, because I am not intimately familiar with the language.

Feedback is more than welcome: you'd be doing me a favor. However, be aware that blogger sometimes eats comments, so be sure to save your text before submitting it. If blogger eats your comment, please e-mail it to me.

No comments:

Post a Comment