Hacker News new | ask | show | jobs
by BucketSort 2675 days ago
I think it depends on what you are doing. If you are just doing API plumbing, the idea of introducing more rigor into the process may seem somewhat absurd. If you are doing real programming, however, Haskell allows you to elegantly structure and think about a problem. Certainly in parsing applications Haskell is a no brainier, Pandoc is written in Haskell for example. People are saying Rust is going to be the chosen one that brings it all together.

For anyone interested in Haskell, I recommend starting with http://learnyouahaskell.com/ (very friendly, intuitive and light) then doing these exercises: https://github.com/data61/fp-course.

2 comments

I'm mostly in agreement with you with the caveat that I've seen lots of "throwaway code" turn into production code that folks end up depending on. These days, if something seems like it has even a remote chance of being adopted into a production system, I'll try to make sure that it's on a solid foundation.

Also, in terms of learning Haskell and its cousins, my advice is to start building stuff right away. It's easy to read about this stuff almost endlessly and never do anything productive with any of it. After learning Haskell, I got into Elm and then later PureScript. PureScript has really opened the door for me regarding getting some of these concepts out into the real world. It's really fun and feels rewarding to actually take advantage of some of the constructs that seemed pretty alien and abstract for a long time.

It is actually quite important to read up on Haskell if you don't have a background in modern FP. It isn't like other languages where you just see what's different from what you already know. There's a lot of conceptual stuff that helps understand what's going on. I actually started by jumping in myself, so I just wrote programs that were quite bad in Haskell terms. I usually recommend jumping into a language right away too, but it really really helps to understand some Haskell concepts at a conceptual level that is hard to understand from just jumping into the code. If one wants to jump right in, they can just do that FP course which is all exercises and skip the book, but I assure you that most noobs will be completely lost. It's like starting someone off in calculus with derivatives, completely skipping over limits and the geometrical underpinnings.
I should clarify that by "jumping in", I'm suggesting getting to a structural foundation that includes monads, applicative functors, monads, and their ilk, and then moving into writing code. I say this because I spent a few years learning this stuff without doing anything remotely practical, and I think that's too long.
Isn't the book you linked a bit dated?
LYAH is a bit dated, but since it focuses a lot more on conceptual stuff, instead of being directly pragmatic, it has aged a lot better than books like "Real World Haskell".
The main concepts are presented well, but people have complained about it being dated. What in particular do you find outdated?
I saw someone confused on haskell-cafe yesterday because it doesn't cover Applicative so their Monad instance was invalid.
Oof that is bad. I admit that I only used it to learn the basic concepts that just did exercises and read the prelude documentation ( which is fantastic ). Thanks for letting me know.