User-Defined Operators, Re: Function composition and currying

Andrew J Bromage ajb@spamcop.net
Sun, 20 Jul 2003 12:42:36 +1000


G'day all.

On Sat, Jul 19, 2003 at 01:52:32AM -0400, Dylan Thurston wrote:

> It's maybe easiest to think in terms of group theory with an
> action on a set: you're just distinguishing between the multiplication
> of group elements and the actual action.  This distinction is not
> usually reflected in the notation, but it's really not such a hardship.

I think that's where we differ.

> But if you have -Point, then you have a 0 Point, and there's no
> distinction between Points and Vectors at all!

Yes there is.  Points and Vectors transform differently when you change
basis, plus the system catches certain kinds of programmer error (such
as adding a Point to a Point).

That you can elude the type system if you deliberately choose to is a
different issue.  Even most Haskell implementations let you do that.

> I tried to think about what that should mean, and did not succeed.  What
> is this operation?

Point + Bivector is used as a shorthand for Point + dual(Bivector).

In Clifford Algebra, of course, everything should probably be embedded
as a Multivector but, once again, this defeats the purpose of the
exercise.  Giving an error a legitimate meaning doesn't always help the
programmer.

Cheers,
Andrew Bromage