4 ms·
I wrote a comment about this below, but I think its fair to say that pedagogy has been a long standing problem in the functional programming community. A lot of
by knucklesandwich 10y ago
I wrote a comment about this below, but I think its fair to say that pedagogy has been a long standing problem in the functional programming community. A lot of the criticisms leveled at haskell for producing "toy software" are better targeted at the poor pedagogy that has plagued haskell for so long.
I think there's lots of examples of production grade libraries in haskell (stm, async, lens, quickcheck, attoparsec, warp, etc.), some of which are effectively best in class among all languages. Likewise, I think there's a lack of acknowledgement of how many stellar compilers are written in haskell. Rust, Perl 6, Elm, Purescript, etc. were all either initially written in haskell (before they become self-hosting) or continue to be. This shouldn't be downplayed... a compiler is one of the most complicated kinds of software you can write, and writing a compiler in a language shows a lot about that language's versatility (which is why a self-hosted compiler is something of a benchmark).
Lack of good resources for learning haskell for so long have incubated haskell as an "experts" language, particularly experts interested in PLT considering haskell extensions have been used as a PLT research platform. I think this is why you see so much evangelism for the language and relatively little industry use: its generally been inaccessible for people without a background in theory for a long time (and its not per se that the language is inaccessible so much as some of the scary sounding, alien seeming design patterns that are conventionally used). Generally I believe this is getting better, though the situation isn't perfect.
As for evidence that this isn't due to deficiencies in the language, I think its worth considering how many ideas from haskell have percolated to the broader programming language community. Promises in javascript, for example, are effectively monadic (technically they're probably closer to bifunctors, but they're definitely very influenced by monads in haskell). Ad hoc polymorphism is now embraced by languages like C++ and rust. These things don't strictly need pure functions to work in the host language, but they're design ideas and language features that were originally developed to benefit a purely functional style.
Edit: As pointed out below, I'm wrong about rust, it was written in ocaml.
- jdub 10y agoRust was OCaml.
- saghm 10y agoI'm pretty sure Rust was originally written in OCaml, not Haskell. Unfortunately, I'm unable to find any references for this, as googling mostly leads to other comments (on HN and reddit) saying the same thing, and Wikipedia's footnote for the sentence stating this seems to be a reference for other parts of the sentence. That being said, Rust itself is heavily inspired by Haskell; most notably, Rust's traits are pretty much equivalent to Haskell's typeclasses in almost every imaginable way, up to and including the way they can be derived for types.
- knucklesandwich 10y agoYeah I'm pretty sure you're right about it being written in OCaml, I just had the recollection of seeing that somewhere as well.