[bitc-dev] On Currying
Jonathan S. Shapiro
shap at eros-os.org
Tue Aug 10 09:42:42 PDT 2010
On Mon, Aug 9, 2010 at 6:56 PM, wren ng thornton <wren at freegeek.org> wrote:
> If I were trying to make allocation explicit in the language, I think
> it'd be better for the responsibility of declaring intent-to-allocate to
> be at the call site, instead of at the definition site.
Yes. I have been saying this all along. Thus
f . x
or some such. What I was trying to ask in this thread was whether we should
attempt to preserve the "spare", parenthesis-reduced application syntax that
is used in ML or Haskell. Let me try to ask the question more clearly:
There are two ways to do "procedures with arity". One is to have procedures
themselves carry arity. The other is to have a tuple type in the language.
Setting the theoretical considerations aside, the two are more or less
The main difference is that the tuple approach really wants to see something
like f(a,b), while the "functions with arity" approach is (perhaps) more
friendly to "f a b".
So I think what I am asking is whether you think we should try to adopt the
more spare application syntax. Do recall that it forces me to introduce an
arity lifting pass.
If you *do* think we should adopt it, should we view it as implicit tuple
formation (in which case procedures still have a single tuple as their
argument) or as procedures of higher arity? Why?
Also, syntax like foo(x,y)(a)(5,42) is goofy :)
Could be worse. We could have done an S-expression language... :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bitc-dev