Haskell: A shining, elegant-as-a-snowflake, expressive-as-Dame-Maggie-Smith language of immense power and no dirty compromises. Pure. Hugely influential. Its very functional farts smell of fresh strawberries.
Completely incorrect. Modern Haskell, by which I mean the thing called Haskell as implemented by the people who run GHC, is nothing but compromises, it's not pure, and it's not even well-designed. With the FFI spec, Haskell is no longer pure, as
unsafePerformIO
lets you violate referential transparency, when you ask people about this, they'll tell you all about how rarely and judiciously it gets used and how necessary it is for ``real world'' programming. I don't recall, however, seeing any mention of judiciousness and frequency of use in the definition of purity, which is that for
all functions, equal inputs mean equal outputs. ``No compromises'', indeed.
Furthermore, GHC Haskell's language and type theory is completely cobbled together with no forethought or planning. It's as if Bjarne Stroustrup designed a functional programming language, it might have started out with something pure and simple, but with a design process that amounts to ``hey, it would be really cool if <niche feature only ``useful'' for masturbatory esoprogramming> in the language itself!'' you quickly end up with Haskell++, a heap of complete shit on top of something that once was quite decent and reasonable. Stop and think about the fact that there are at least 2 distinct routes to type system Turing-completeness via GHC
LANGUAGE
pragmas, except not quite, because the smart people over at GHC headquarters have thought of this and decided to make the typechecker stop evaluating after about 3 seconds of computation, so instead of Turing-completeness you end up with ``as much typechecking as you can fit in a few seconds''-completeness. How elegant. This is of course, not even counting the bolted-on pseudo-dependent type theory that is now at the very core of GHC (another way to prove False, just what we needed, except this time we don't even need to use unbounded recursion!), and countless other decadent extensions that make you begin to question what language you were trying to write in the first place. As a side note, Haskell still doesn't have a record system, just in case you were wondering if perhaps they had simply run out of useful things to work on.
Even without the egregious disregard for its foundational structure, at the term level things are looking no better. Recent changes to the standard Prelude (you know, the thing every single Haskell program has in scope by default) now mean that gems as
length Nothing
(returns
0
) and
elem 7 (7, 9)
(returns
False
) and such are now perfectly valid and well-typed GHC Haskell, with equally intuitive return values. Isn't the whole point of having such a nice type system to reject such garbage? When you fail to use the new ad-hoc-ized Prelude functions, you are often met with helpful error messages complaining that your type is not the same type as some type variables it made up, and mentions nothing about what type actually
should be there (in contrast to pre-ad-hoc-ized Prelude, which will happily tell you if you used something that wasn't a List with something that wanted one).
It's just a huge fucking mess created by people with no clue what they're doing. The people behind the wheel have betrayed the principles and foundation upon which the project started and ruined everything good about it.