Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

i once had a conversation that ended with "i don't know enough category theory to be good at haskell."

after learning a (little) more category theory and a (very little) more haskell, i think that assessment was inaccurate, and i wouldn't want anyone else to think the same thing.

haskell is strictly-typed, sugared lambda calculus. if you want to learnyouahaskell, think about types and type classes. learn how to desugar wheres, lets, guards, etc. don't worry about functors, much less monads.



> i once had a conversation that ended with "i don't know enough category theory to be good at haskell."

> after learning a (little) more category theory and a (very little) more haskell, i think that assessment was inaccurate, and i wouldn't want anyone else to think the same thing.

Indeed. I work with some of the most highly-regarded Haskellers that exist. Few of them would claim they know much (or any?) category theory, nor do they care about category theory.


I don't know who the Haskellers you refer to are, or who they're regarded highly by, but all of the core members of the Haskell community that I know do care about category theory, and do know some amount of it. It's too useful to ignore.

You absolutely do not need to know category theory to use Haskell effectively and productively. Once you've been using it for a while, though, you pretty much inevitably start learning (and caring about) the mathematics that underlies it.


I'm pretty sure most of the following would say they don't know much (or any) category theory:

Simon PJ, Simon Marlow, BoS, Lennart Augustsson, Don Stewart, Duncan Coutts, Neil Mitchell, Roman Leshchinsky

That hasn't stopped them producing masses of great Haskell.

I would welcome correction or clarification by any of the above luminaries!


> Don Stewart

he wrote my window manager!

going out on a limb, i guess these people would say that they don't know much category theory because they understand that category theory contains results, not just definitions. moreover, it bleeds into algebra, geometry, k-theory, etc. pretty fast. even some /very/ respectable mathematicians (e.g. matsumura) are hesitant to say they know much about all of these things.

i think it's really cool that haskell makes programmers interested in math. i'm still pretty sure that everything about it that has anything to do with category theory is contained in the Prelude or on hackage, tho. in other words, all the category theory stuff that's "built-in" to haskell is itself expressed in haskell. at the risk of raising some hairs: at one point Crockford mentioned that making monads is possible in javascript, too.


> > Don Stewart

> he wrote my window manager!

Mine too!

To be clear, I would guess (and I'm by no means sure) that these very highly regarded Haskellers barely know how to define "category" and "functor" (the mathematical versions, not the Haskell versions) and certainly don't know how to define "natural transformation". I admit the following as evidence: https://twitter.com/bos31337/status/656319244263518208

I think it's very important that we, as the Haskell community, reaffirm at every possible opportunity that you do not need to know category theory, or even much mathematics, to succeed at Haskell.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: