Live data from Hacker News

Haskell for Beginners

blog.kalvad.com

41–46 of 46 posts

Re: Haskell for Beginners

#41

I'll add my two cents. Over the past year or so I went from being completely overwhelmed by Haskell to feeling pretty comfortable reading / writing Haskell, even enough to make my first PR to a Haskell package! Here's what worked for me: * I went through LYAH, but at a certain point I felt like it wasn't doing me any favors by sweeping some of the inherent complexity under the rug. So I started listening to talks by…

The main reason to learn category theory for Haskell is to learn how much of the Haskell meme complex is wrong. Otherwise, it won't help the typical newcomer. I think it's important to explain that Hask isn't a category, that Haskell's type system is unsound, that Haskell doesn't have sum types, etc. There are powerful applications of category theory to other parts of computer science. If one keeps in mind that Haske…

Agreed. Let me drop some references about the relationship between Haskell and Category Theory that really helped me untangle these concepts, in case it might help others.

[1] Haskell/Category Theory https://en.wikibooks.org/wiki/Haskell/Category_theory#cite_n...

[2] Bauer 2016, "Hask is Not a Category" http://math.andrej.com/2016/08/06/hask-is-not-a-category/

[3] A reddit comment in response to #2, https://www.reddit.com/r/haskell/comments/4wk0gs/hask_is_not...

[4] StackOverflow, "Is Hask even a Category?" https://stackoverflow.com/questions/48485660/is-hask-even-a-...

Re: Haskell for Beginners

#42
post #40
post #39

Earlier quoted context omitted.

> Haskell doesn't have sum types Say what?..

I think it's because `Either a b` contains all of `undefined`, `Left undefined` and `Right undefined`. In other words, a technicality.

And this is not even the bottom of Haskell's unsoundness.

Re: Haskell for Beginners

#43
Learning Haskell as a beginner might be, IMO, comparable to learning something like Java or other languages w/ a lot of baggage (= daunting for a beginner), so I believe books or tutorials can only help so much.

I would suggest playing w/ a "smaller" language like ML (https://learnxinyminutes.com/docs/standard-ml/) or even Hope (https://github.com/hcarvalhoalves/hopeless) to understand the sources of inspiration and grasp some concepts of FP, pattern matching and algebraic data types. The more featureful Haskell may be less confusing if you can better discern what are core concepts vs. unique features, and also avoid fixating in monad tutorials.

Re: Haskell for Beginners

#44

Noob question: does it worth, for a beginner, to start with Haskell instead of Elm or Purescript?

Even if you want to learn Haskell, learn Elm first. Two weekend of Elm will do more to explain Haskell do you than just about anything else.

Elm is beautifully simple. And it gives you such a solid foundation to learn Haskell and how to think in Haskell. Even if it's not Haskell and is a much smaller language.

4 out of 5 people will learn Haskell faster by learning Elm first, than by just focusing on Haskell. And I mean even accounting for the time learning Elm it still will be faster to learn Haskell.

Re: Haskell for Beginners

#45
post #21

Learn Haskell in 1-2-3: 1) WHY: The Functional Programmer's Toolkit - Scott Wlaschin : https://www.youtube.com/watch?v=Nrp_LZ-XGsY 2) WHAT: Learn Haskell in one video : https://www.youtube.com/watch?v=02_H3LjqMr8 3) HOW: Haskell without the theory : https://www.vacationlabs.com/haskell/ It'll teach you enough to be dangerous. Obviously your learning has just begun, but with a mental platform that lets you study other…

Also consider https://leanpub.com/fp-made-easier , which teachers Purescript, very similar to Haskell. I've skimmed some of that book and like the writing style.

Re: Haskell for Beginners

#46
post #2

Why not simply read "Learn You A Haskell", which is mentioned in the introduction?

Because it's not an effective learning resource. Too many people read LYAH only to be left with a very shallow understanding of how to use Haskell and little to no experience on building even small projects in Haskell.

I mention other, better resources in my haskell study plan: https://github.com/soupi/haskell-study-plan

Post reply on HN