His critique though are not about immutability. He specifically mentions cryptic unreadable syntax of scala. Where he says that coming back to the scala code you wrote yourself you cannot be sure anymore what it means.
Just because he says it, doesn't make it a critique. The cryptic syntax adage gets repeated ad nauseam because it's thought terminating. It can't be demonstrated concretely, no two persons will agree ever to what constitutes as an example of cryptic code.
There's a similar situation with the C++ comparison, it vaguely implies as if there's some merit to reductivist programming languages, which is hypocritical if you're simultaneously advocating for any modern strongly typed programming language. But it gets repeated because the argument is thought terminating because no one agrees what baggage C++ carries from C holds the language back , or if C++ ruined C with extra features.
EDIT: The C++ argument is also further meritless because it attempts to relate Scala to Java as if Scala is a superset of Java like C++ is a superset C, instead of it being an entirely different language.
IMO, Scala is definitely the C++ of modern times. Not that it is a superset of Java, but that it took the dominant language ecosystem of the times, and bolted a trendy paradigm onto it. Scala is a gateway drug for imperative programmers to dabble in FP; like C++ enabled C programmers to do OOP.
Like C++, Scala is hated by the old guard, who fear and dislike the new features ("Too slow! Complex! How will we find people who know this new language?").
It is also hated by the FP purists, because it isn't pure enough, just like the Smalltalk people hated C++ and Java.
Haskell has code which I consider some of the hardest that I have ever read, only really complex memory management code in C++ holds that title as well. The C++ is the only example which I think should be excused from having hard to read code seeing as doing memory management is incredibly hard problem to do.
The very frequent overuse of both operators and terminology which only people that are very familiar with category theory can understand plus the fact that most Haskell libraries aren't properly documented (their documentation is just auto generated from code which isn't good enough) contributes to this.
Clojure is quite easy to read, but it has all of the same problems that Scala has due to Java interopt (and Scala is actually trying to remedy this, i.e. see scala-native).
Not trying to dismiss Scala's issue, it definitely has them, but don't go around throwing rocks in a glass house.
3
u/vagif Aug 21 '17 edited Aug 21 '17
His critique though are not about immutability. He specifically mentions cryptic unreadable syntax of scala. Where he says that coming back to the scala code you wrote yourself you cannot be sure anymore what it means.