[bitc-dev] Arity: middle position?
cngilbreth at gmail.com
Thu Aug 12 04:30:04 PDT 2010
On Thu, Aug 12, 2010 at 1:22 AM, Jonathan S. Shapiro <shap at eros-os.org>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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bitc-dev