Mathematics in Haskell Re: [Haskell-cafe] Why the Prelude must die
Jacques Carette
carette at mcmaster.ca
Sun Mar 25 12:10:22 EDT 2007
My main worry is that this can be a horrible time sink without a clear
path to success and, worse, known obstacles in the way.
For example: we know that all Monads are Functors, but that is not
expressed in the type classes, because it would be too much a pain to do
so. That pain is heavily multiplied in a 'proper' subdivision of
mathematical types. Until that is fixed, I know I do not consider it
worthwhile to spend a lot of time working on this because the end result
might be correct, but completely unrealistic.
Another obvious item is that the lessons from DoCon have not all been
reflected into advances in Haskell, not even Haskell'. If I was in a
pessimistic mood, I would mention the lessons from AUTOMATH (you know,
stuff from 1968 to the mid 70s).
Claus Reinke wrote:
> ok, tongue out of cheek again, someone would need to investigate the
> particular shape in which such abstract concepts would be most useful
> (which may or may not be the same shape best known in maths, see
> Monad, Monoid, Applicative, Arrow,..), and how those shapes are best
> expressed within the programming language abilities. and then, of
> course, someone would need to write code and tutorials.
Agreed. This is why I mentioned semi-groups when someone talked about
classical structures like rings and fields. To pick just one example,
Kleene Algebras seem more applicable to CS than say fields. Similarly,
there are more rngs and rigs than rings. More applications for
non-archimedian fields (power series) than archimedean ones (reals).
And so on.
> perhaps i was mistaken in thinking that there is a group of
> math-interested
> haskellers out there discussing, developing, and documenting the area? or
> perhaps that group needs introductory tutorials presenting its work?
My guess is that there are a number of people "waiting in the wings",
waiting for a critical mass of features to show up before really diving
in. See
http://www.cas.mcmaster.ca/plmms07/
for my reasons for being both interested and wary).
Probably the simplest test case is the difficulties that people are
(still) encountering doing matrix/vector algebra in Haskell. One either
quickly encounters efficiency issues (although PArr might help), or
typing issues (though many tricks are known, but not necessarily
simple). Blitz++ and the STL contributed heavily to C++ being taken
seriously by people in the scientific computation community. Haskell
has even more _potential_, but it is definitely unrealised potential.
Jacques
More information about the Haskell-Cafe
mailing list