On Sun, Feb 15, 2015 at 1:56 PM, Geoffrey Irving <[email protected]> wrote:
> Looking over this discussion, I'm quite partial to Matt's solution,
> summarized as (correct me if I'm wrong):
>
> 1. Parse "f x y z ..." with n+1 juxtaposed terms as an arity n
> function applied to n things.
> 2. Require parentheses to indicate fancier arity.  "(f x y) z" means f
> has arity 2, "f x y" has arity 1.

Yes.

> 3. Ban nullary functions in favor of arity-1 functions taking an empty
> tuple, or similar.

I didn't say that, because I didn't think of it. The Lisp syntax would
be ambiguous in this case, so your solution makes sense. It's a wart
though.

> 4. Types would probably look like "x y z -> w"?

I hadn't decided.

> No hidden types, easy to read off the arities from the code, no
> frightening type inference fanciness required.  It requires a few more
> parentheses than Ocaml/Haskell, but strictly less than C, and the
> extra parentheses convey information about weird arities.  The calling
> convention for nullary functions can match C if we treat zero-size
> types appropriately.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to