Haskell is a programming language which uses some concepts from category theory like functor, monad, etc. My question is: Learning intuitive concepts about category from Haskell will ruin my intuition when I learn category theory as a mathematician or it could help developing it?
Is learning haskell a bad thing for a beginner mathematician?
8
$\begingroup$
computer-science
category-theory
-
15How could it possibly be bad? – 2011-02-11
3 Answers
10
Just to echo what Mariano said: you may also be interested in reading the various responses to
4
No, on the contrary, I think it will help your understanding.
3
One problem is that "class Functor", "class Monad" are special cases of categorical concepts, namely the strong ones. With Haskell, you are working in the specific category. That may hinder learning category theory in full generality. Of course, this is just my POV, someone can perceive that obstacle as a no-brainer.
A concrete example. Try to define "instance Monad", i.e. a monad, on the category of rings which sends a ring R to the ring of polynomials with coefficients in R.
-
1It's not quite fair to say that with Haskell you are learning about one specific category. At the core of Haskell is a lambda calculus that is precisely the internal language of cartesian closed categories. Anything you prove about Haskell programs within this core using CCC language will apply to any CCC. More generally, the applicability of what you prove about Haskell programs is a function of the generality of your argument and many proofs about Haskell programs are easy to generalise to various classes of category (eg. by writing them in point free form.) – 2012-02-15