Hi Steve & Mike, I completely agree with Steve, I'd like to add that instead of functional programming we could have said "mathematically structured programming". But then indeed the two terms are very closely related. Category Theory helps us to structure abstractions. In Computer Science and in other areas (e.g. Physics). Some people seem to think that abstractions don't buy your anything concrete. E.g. they don't deliver faster algorithms or new physical theories. These people often overlook that everything they do relies essentially on abstractions which have been established a while ago. Hence, while it is hard to measure the impact of abstractions exactly, IMHO it is almost impossible to underestimate their value. Cheers, Thorsten On 23 Dec 2009, at 11:19, Steve Vickers wrote:
Dear Mike,
Of course, in functional programming the applications of categories go far beyond lambda terms.
(1) At a fairly elementary level, the treatment of list types in functional programming languages gives a good lead in to universal properties (e.g. list type = free monoid or free (empty, cons)- algebra). Things you do with the universal properties are present as well known tools in functional programming with lists. The universal properties can then be used to motivate the abstract structure of categories: they describe data types by their external interfaces with the rest of the world rather than by their concrete internal structure, and the morphisms play the role of saying what the external interactions are. Expositionally, for Mac Lane universal properties were an important example where the working mathematician had been doing category theory all along without knowing it.
(2) More advanced, Haskell has made important use of monads as a programming technique for bringing side-effects, I/O etc into functional programming in an elegant way. (The way this came about is that it has long been more or less self-evident that categories are just what you need for describing the semantics, and the categorical experience of the semanticists led to the practical application of monads.)
So it could be that the best way forward is to teach them Haskell first. (I gave a short introduction to categories at Imperial, in the Compujting Department, and I exploited heavily the fact that they had all done Miranda, a predecessor of Haskell.)
Regards,
Steve Vickers.
[For admin and other information see: http://www.mta.ca/~cat-dist/ ] Status: RO