On Mon, Feb 16, 2015 at 2:21 PM, Jonathan S. Shapiro <[email protected]> wrote:
> On Mon, Feb 16, 2015 at 10:58 AM, Matt Oliveri <[email protected]> wrote:
>>
>> On Mon, Feb 16, 2015 at 10:46 AM, Jonathan S. Shapiro <[email protected]>
>> wrote:
>> > So I think that another viable proposal here is to decide that a
>> > function
>> > definition can only specify a single pattern, and that from a type
>> > theory
>> > perspective all functions are arity-1.
>>
>> Yes. I think that's the best proposal so far, actually.
>>
>> > Such a function can return a lambda,
>> > allowing it to be progressively applied in something like curried style,
>> > but
>> > the compiler is not inserting any accumulations in this case.
>>
>> I don't know what you mean by an accumulation. If the function is
>> natively curried, you're saying there's still some trick to provide
>> all the arguments in one function call?
>
> I'm not sure what "natively curried" means in a language where all functions
> are arity-1.

An arity-1 function that returns an arity-1 function that returns...

> What I was trying to say is that when all functions are arity-1
> the compiler never needs to insert lambda wrappers to turn curried
> application into intermediate function calls that accumulate the arguments.

Oh! OK, I understand now. So in other words, because curried
applications are only allowed on functions that are natively curried,
the compiler doesn't need to generate lambdas to curry them.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to