On Thu, Feb 12, 2015 at 9:07 PM, Matt Oliveri <[email protected]> wrote:

> The only possible problem with modeling multi-arg functions as
> functions taking a tuple is that the tuple might be boxed, in which
> case it's not the efficient calling convention you want....


In BitC, tuples are unboxed. So if a boxed tuple argument pattern is
presented, it will show up in the pattern as something like "ref (a, b,
c)". Following the previously sketched arity inference rules, the inferred
arity for that pattern is 1, because the top level argument pattern is not
a tuple pattern.

Similar story for modeling functions with named args as a function
> taking an unboxed record.
>

I think we should try to avoid discussing boxed patterns in the discussion
of arity. It will confuse things, and the resolution is very simple; a
parameter of boxed type is always passed as a single word pointer.

My recommendation to use
> Lispy call syntax...


Matt, you may remember that early BitC had a LISP-like surface syntax? It
was *such* a relief when we finally transitioned away from that.

That said, I truly admire the enthusiasm of your parenthesis fetish, and
keeping in mind that it's important to be gentle when you disagree with
someone in email, I want to make sure that I express my view on LISP-like
syntax in the kind of non-excessive, moderate, appropriate, and respectful
tone that this particular proposal truly warrants. So:

Not if you put a gun to my head, shoved a red-hot poker up my posterior,
flayed the skin from my body by inches, ripped out my eyeballs, and broke
my fingers slowly, one bone at a time.


Hmm. I guess I haven't quite got the hang of the passive-aggressive "never
say anything that might be construed as contradiction" style that seems to
be preferred here in the Pacific NorthWest.

And mind you, I'm actually a *fan* of LISP and Scheme...



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

Reply via email to