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?
Asked
Active
Viewed 1,255 times
9
-
16How could it possibly be bad? – Mariano Suárez-Álvarez Feb 11 '11 at 05:54
2 Answers
11
Just to echo what Mariano said: you may also be interested in reading the various responses to

Willie Wong
- 73,139
4
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.

beroal
- 2,472
-
1This makes no sense! :) Anyone sane learns most categorical notions in a specific category before hearing them in the abstract, which is itself abhorrently uninteresting to most mortals except because of specific categories! – Mariano Suárez-Álvarez Feb 13 '11 at 06:42
-
1
-
I agree: that learning something first in a special case will inhibit your later learning of a more general case is one of the most bizarre pedagogical ideas I've ever heard...but no so bizarre that I haven't seen people on MO and this site who hold it. I mean, when thinking about pedagogy, pretend you are an actual human being...is that so hard?? – Pete L. Clark Feb 13 '11 at 09:44
-
2@Pete L. Clark: I do not mean “learning in a special case” is bad, rather dwelling on that special case for too long is bad. You tend to assume that propositions that are true in that special case is true in every category. I hope that OP will flinch from that destiny by not allowing Haskell to become the only “universe of discourse.” E.g. how we can learn about adjoint functors by examples in Haskell? – beroal Feb 19 '11 at 05:42
-
@beroal: "You tend to assume that propositions that are true in that special case is true in every category." I do? How do you know that? Anyway, if you're trying to argue that in order to be a good mathematician (in any field) one should learn more than just certain programming languages...no need. I'm sure everyone agrees with this. – Pete L. Clark Feb 19 '11 at 09:29
-
P.S.: For any $X$, that "doing $X$ for too long is [in some way] bad" seems to follow from the definition of "too long". So I can't argue with you there either... – Pete L. Clark Feb 19 '11 at 09:32
-
@Pete L. Clark: ""You tend to assume that propositions that are true in that special case is true in every category." I do? How do you know that?" I mean "human beings do". I am sure this kind of phrase is used often in English. Sorry again for the misunderstanding. ... I look positively at learning Haskell, just do not let Haskell's limitations stop you... not you, but... somebody else. :) I even recommend "Burstall, Rydeheard. computational category theory." (It is in ML.) – beroal Feb 20 '11 at 09:07
-
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.) – Dan Piponi Feb 15 '12 at 16:32