[MLton-user] Fixpoints

Vesa Karvonen vesa.karvonen@cs.helsinki.fi
Thu, 3 Aug 2006 14:49:06 +0300


Quoting Vesa Karvonen <vesa.karvonen@cs.helsinki.fi>:
> Quoting Stephen Weeks <sweeks@sweeks.com>:
[...]
> >   1. Only use currying if there is actual staging of computation going
> >      on.
> 
> Ok, I'll bite. :)
>
> I somewhat sympathize with that view (that currying should be reserved for
> staging), but I value other aspects more. [...]

Let me clarify this a bit.  What I meant to say is that I understand that there
is some value in making staging explicit in the types.  For one thing, doing
so means that changes to staging are reflected in the types and type checking
will then guide the programmer to reconsider all the places where staging may
need to be introduced, because otherwise performance might suffer.  But, like
I said, I value other aspects (better readability (due to simpler types) and
better composability) more, because, in my experience, it is fairly rare to
need to change staging after initial implementation and then one can always
grep through the code.  I also trust (hope) that compilers are smart enough to
eliminate redundant currying in most cases, so the performance cost of currying
should be insignificant.

-Vesa Karvonen