On Mon, Mar 9, 2009 at 10:00 AM, Jonathan S. Shapiro <[email protected]> wrote:
> Purity is not the only effect of interest. Heap allocation is another.
>
> I do concur that a partial application does not entail mutation effects,
> though it does entail escape (which has consequences for by-ref parameters).
> The more I think on this, the more interactions it seems to have, which
> inclines me (somewhat) to defer.
>
> shap, from my phone
If we take heap allocation into account, even the first equivalence of
yours breaks down. I.e.,
(pure fn 'a 'b -> 'c) != (pure fn 'a -> (pure fn 'b -> 'c))
since converting from left to right requires allocation. Overall, I
agree that currying adds far too many complications relative to its
advantages.
I still think that "curried" syntax is an option, but it may be too
magical to stomach, since parentheses would be required for any
function with a curried type. E.g., if
f : a b -> c
g : a -> b -> c
the calling syntax would be
f a b + (g a) b
Geoffrey
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev