I hope this post is not inappropriate but I would love to hear your arguments. I am not suggesting scala is bad, just asking so please don’t be mad at me. I am currently learning scala and planning to work in the functional paradigm and I was searching for a beautiful modern functional language that I can have a full-time job and scala seems really promising (FP and lots of jobs offer). But I found not everybody thinks scala is great language. Here is a Reddit post where you can read how verbose, badly designed, not acceptable as FP, language for naive FP newbie and disastrous scala is compared to f#.
Can I ask you if you can give some arguments against it and that scala is a good language for pure FP (with libs like Cats 2)? Or maybe scala 3 will improve on expressiveness or ambiguity? Or maybe you can point to some discussions that are already there on the scala forum. Have you tried f# and can compare how scala work in big projects and that f#? I personally can’t believe that so many intelligent programmers were using scala if it was that bad.
Here is one comment from there:
I just think Scala is so badly designed that it borders on unusable for programmers like myself. I’ll try to go into more detail, but beware, I’m in rant mode
Scala’s attempt to ‘fuse’ FP and OOP is one of the many things that hurt its design. It was wrong-headed to try to fuse two entirely orthogonal language concepts , and the results were predictably disastrous.
The major practical point of moving to a functional language is to get away from OO thinking. Unfortunately, Scala’s fusion-ness makes that nearly impossible. You can’t do FP without OO because the syntax (and even semantics) for each is overloaded for the other! Having less keywords in a language can be nicer, but overriding their meaning (and worse, semantics) to achieve that is many times worse.
Objects are great when you actually need them (EG - for components) but object- orientation is just not good in most situations. Coupling program behavior with representation generally inflicts much incidental complexity in programs (http://fsharpforfunandprofit.com/posts/cycles-and-modularity-in-the-wild/). See also Scala’s atrocious collections library in detail.
Scala constantly violates the principle of least surprise nearly everywhere in its usage, whether you’re an OOP or an FP person. From which perspective was X language feature designed? One or the other, sure, but you’re typically left guessing, then referring to the spec.
There is almost no consistency in or predictable model of thinking for how Scala is defined. People still can’t pinpoint what the basic programming idioms for Scala should be! This partly goes back to the fusion, but also can be blamed on Scala’s general incoherence of design.
Scala is hugely complex with surprisingly little payoff in expressiveness. This is especially true for the type system. We get the complexity of type inference multiplied by that of implicits / sub-typing / variants / etc. The complexity of the type system is combinatorial! At the same time end up with weaker type inference than F#.
Scala’s design seems to have been generally incoherent - throwing together features that either failed to add to or actually detracted from its whole. Did we really need co/contravariants to make the type system even more incomprehensible than it already was? Maybe, due to its mutant fusion of OOP/FP… But that’s where coherency in design decisions must come in!
Scala essentially combines the complexity of C++ with the speed of Java. It combines poor-support for generic types with a very ambitious type system. It really is the worst of many worlds.
To avoid going on too long, Scala is just a failed experiment with a long enough feature list to attract naive programmers and functional newbies. While we should perhaps applaud the gumption it took to take such an experiment as far as Scala has been taken, now that the failure is clear in hindsight, we need to call it what it is.