"Christoph Rippel" <crippel / primenet.com> wrote:

>  Since Till mentions categories it is probably worthwhile to point out
that
> they far form useless in CS.  They are very important for the theoretical
> foundations of FP and modern FP languages like Haskel use categorical
> concepts like monads (invented by mathematicians decades earlier) even for
> their IO-system.  By the way there is a striking similarity between  C++
> meta template programming and FP programming IMO.

Oh yes. I was amazed at how much ML looked like what I developed as a style
for C++. Partial specialisation is just like ML's ability for a function to
be different things according to the arguments.

Except, the expression is far cleaner in ML than in C++. I found myself
writing really cool stuff that can't be used because no-one else understands
it (or it breaks the compiler). But all I was doing (unbeknownst to me at
the time) was trying to do what functional programmers take for granted:
strong static typing with the ability to construct type systems and program
flow at compile time. In both approaches, the effort is in getting a clean
compile -- the rest is academic.

I became frustrated at how tantalisingly close partial specialisation was to
what I wanted to say.

Sadly, I am not very familiar with the mathematics behind FP, and this is
the wrong forum to ask about it anyway. I should have payed more attention
to discrete math at University. Off to the bookshop with you, Christian.

> Christoph

Christian.