If I tell you that Haskell has a fragmentation problem, I feel good about telling you that because I actually have experience with it.
However Haskell is still a language that I'd pick over Java, Go, JavaScript or any of the mainstream languages for that matter and I'd be willing to put my reputation on the line for that choice.
I also worked with C++. To see people compare Scala and Haskell with C++, kind of rubs me the wrong way.
And unfortunately such opinions stay on the Internet forever, are picked up by beginners and repeated verbatim.
So no, there's a huge difference between Scala, Haskell and C++. For one the former wouldn't lead to stupid and disastrous bugs like Heartbleed, whereas C++ can and routinely does. By comparison when well typed Scala or Haskell programs compile, the defect rate tends to be really low.
I'm seriously thinking about starting a course in how badly and easily you can fuck up in C/C++, for people that make unfair comparissons with them, making life hard for their managers :-)
Also just to get this out of the way... the problem in Scala are actually the Java refugees going gung-ho on OOP. And the FP people, because they tend to be more experienced, are the ones cleaning up the mess.
And I like that. You know why? Because Scala makes it possible to introduce FP gradually, without an organization wide commitment. In the company I'm working for, a language like Haskell would never fly, but Scala does.
Also in case you haven't noticed, FP is spreading.
- in Typescript/JS you have fantasy-land and fp-js
- in Kotlin you have Arrow
The difference is that you don't get the nice type system to support those abstractions well, so you also get the weird HKT and type class encodings to go with it. Although in fairness the Arrow guys are working on compiler plugins for better supporting type classes and the HKT encoding that they use.
So if you're conservative about adopting FP, language choice will not really protect you ;-)
To be clear, I wasn't comparing languages in terms of correctness of code you could potentially produce. Of course C++ is the worst on this metric. However, it has its own niche in low-latency setting where I can't see anything else replacing C++ any time soon.
Otherwise, exactly on the target. I hear java is getting continuations and tail call elimination soon
1) Many compiler-option language extensions: https://downloads.haskell.org/~ghc/8.2.2/docs/html/users_gui... --- these add new language syntax and deep features. They radically change the meaning of the code you're reading.
2) Multiple competing standard library collections ("preludes"): https://guide.aelve.com/haskell/alternative-preludes-zr69k1h...
3) Haskell's language spec ceased development a decade or so ago. So the above diversions are never rolled back into the language. Instead, all forward development to Haskell is done in the form of new compiler options.
I'm not too familiar with Scala, but I'm pretty sure it doesn't suffer from these problems.
There are even more sources of Haskell fragmentation, such as many competing methods of error handling, input validation, and data records.
(I'm a Haskell user who wishes this all weren't the case.)
Not an expert in Haskell, nor Scala - only dabbling. However, the above could be repeated verbatim after replacing Haskell with Scala, couldn't it? You can write Java++, Haskell-- or any combination in between. Use one of the several FP stacks or build tools.
I think both Scala, Haskell and C++ can compete for the name of the most complicated, fragmented and diverse language and ecosystem in existence.