4 ms·
Stuff like this makes me wonder why: a) Haskell isn't used more widely b) isn't taught in school more. It seems it's a language that's intellectually stimulatin
by maxxxxx 9y ago
Stuff like this makes me wonder why: a) Haskell isn't used more widely b) isn't taught in school more. It seems it's a language that's intellectually stimulating and shows how much a good language design can help with programing work.
- tombert 9y agoThis is just my opinion, but as someone who has actually worked full-time with Haskell (though admittedly not since 2015), I think a lot of the problem is due to Haskell's awful error messages and, for most of its life, awful tooling. When a newbie starts using Haskell, they are immediately put off by the fact that the messages are...esoteric to say the least; weird things of `result a0, expected [b0]`, can be offputting, and make things like F# a much more attractive option. Also, I feel like, until Intero, editor integration with ghcmod was incredibly difficult to set up, and fairly easy to break, to a point where I eventually uninstalled it. Cabal, while certainly interesting, would end up in weird scenarios where dependencies wouldn't resolve correctly, resulting in "cabal hell". Stack has greatly improved on all of these points, and hopefully Haskell catches on a bit more, because despite my criticisms, I do think it's a fantastic language and platform.
- Tehnix 9y agoDefinitely the tooling is still a big problem, but there has been great improvements lately! - HIE (Haskell IDE Engine) finally got some steam behind it, and has been chugging along for some time now, being very usable and targeting LSP! - Intero (as you mention) - ghcid is a nice lightweight alternative I personally feel stack + hie is a very good setup, and can be used in VSCode, Atom, Neovim and emacs via LSP clients. Error messages are slowly improving. GHC 8.2 got nice highlighting of the location of the error and some colouring, bringing it just a little further. I personally like how nice Elm is, but then again it has the advantage of a much simpler type systems, which significantly simplifies error handling.
- tombert 9y agoYou just highlighted how out of practice I am with Haskell...I need to fix that! I think I will play with HIE this weekend. I definitely think Stack is excellent, and greatly reduces the cost-of-entry for new devs, and it's only getting better, so Haskell is far from hopeless.
- hchasestevens 9y agoAbsolutely agree - the difference between the error messages in Haskell and its derivative Elm is night and day (see http://elm-lang.org/blog/compiler-errors-for-humans http://elm-lang.org/blog/compiler-errors-for-humans , http://elm-lang.org/blog/compilers-as-assistants http://elm-lang.org/blog/compilers-as-assistants ).
- tom_mellior 9y agoI was a teaching assistant in courses teaching Haskell, and I found that most students didn't want to be intellectually stimulated in this way...
- maxxxxx 9y agoI guess that's in line with a lot of CS graduates I see at work.
- zwieback 9y agoI'm not surprised - maybe it's just too early. I assume you're talking about undergrads. I didn't get interested in type theory until I'd been a programmer for many years. I think a few students will be immediately drawn to stuff like this but others will need to learn and use a few programming languages to appreciate the finer points.
- protomikron 9y agoMy experience is that it is really difficult to estimate runtime performance and memory requirements of Haskell programs. Not that it is impossible, but the straight-forward solutions often blow up in memory. Furthermore libraries vary immensely in quality and for beginners it is hard to pick the right one for your job. Unfortunately most of them are also documented quite ... sparse. It is also non-trivial to get a good web-stack up and running and there are many competing solutions using different architectures and with a different stance on type-safety. Their poor performance in benchmarks like https://www.techempower.com/benchmarks/ https://www.techempower.com/benchmarks/ does not help either. I don't want to dismiss Haskell and love the idea of FP especially using advanced type systems to get rid of possible bugs before runtime, but using it for specific tasks is not always straight-forward compared to more established languages.
- machiaweliczny 9y agoAFAIK(according to my FP teacher): a) Too complex compiler and lazy nature of haskell - generated code is hard to debug and optimise. Small changes to code might change how thing's gonna be executed so you lose control, where in OCaml it's quite straightforward and you can guess how generated code will look like. b) We had quite good intro at our university. I like how succint haskell/ML syntax is. But I prefer practical work and controll so I personally plan to learn/use either F# or Reason/Ocaml.