On Thu, Aug 12, 2010 at 1:22 AM, Jonathan S. Shapiro <[email protected]>wrote:

> Hmm. It occur to me that there may be a "middle position" on arity
> handling. We could *record* the arity information for purposes of type
> computation, but *disregard* it for purposes of type compatibility.
>

Another way of thinking about it might be: functions in BitC *do* have
arity; but BitC has some convenient syntax for partial and over-application
of functions, which looks just like currying.

So in my previous example, a procedure taking two arguments and returning a
> function might be written as:
>
> 'a -> 'b -> ('c -> 'd)
>
>
If you think about it in the way I just phrased, the signature would be

'a 'b -> ('c -> 'd).

It's conceptually slightly different but I think amounts to the same thing
functionally. I think this way is more natural to think about if you come
from a "normal" programming language though. (And involves fewer arrows :-).

Does this smell like it might work? If so, then the whole thing becomes
> purely a matter of surface syntax.
>

I don't have the expertise to say, but it does seem like the "natural"
solution to me.

Chris
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to