[bitc-dev] currying for zero arguments
Jonathan S. Shapiro
shap at eros-os.com
Thu Mar 12 13:06:44 EDT 2009
On Thu, Mar 12, 2009 at 11:03 AM, Geoffrey Irving <irving at naml.us> wrote:
> On Thu, Mar 12, 2009 at 11:45 AM, Jonathan S. Shapiro <shap at eros-os.com> wrote:
>> OTOH, if we adopt the "apply to unit" idiom, then *all* multi-arg
>> applications once again involve parens, and at that point the
>> syntactic ambiguity may turn out to solve itself. I'm going to check
>> that out.
> That doesn't follow from my understanding of the apply to unit idiom,
> so can you explain why all multi-arg applications would involve
> In ocaml/haskell/etc., all functions take at least one argument, and
> parentheses only need to occur in one of the arguments is a unit.
In ocaml/haskell/etc, all functions take *exactly* one argument, and
pairs must be introduced in ordertopass multiple arguments in a single
As we discussed in another thread, the optimization that lifts curried
procedures into conventionally multiargument procedures is not
transparent w.r.t. allocation effects. So far as I can tell, this
forces us into n-ary functions.
It all seems fairly icky at the moment. When the parser generator
tells you that you have 40+ shift/reduce conflicts, you've either done
something obvious and stupid or it is time to re-syntax. At the moment
I can't tell which condition applies to me.
More information about the bitc-dev