On Mon, Feb 16, 2015 at 11:08 AM, Matt Oliveri <[email protected]> wrote:
> On Mon, Feb 16, 2015 at 11:43 AM, Jonathan S. Shapiro <[email protected]> > wrote: > > > > My gut says that we should clean this up, and introduce a proper tuple > type > > this time around. > > What about records (tuples with not-first-class names for fields)? > Don't they screw with the mixfix system at least as badly as tuples? Oddly enough, they do not. BitC records don't have any special construction syntax, so you have to supply the name of the value constructor. At that point it looks exactly like a function call. What happens when we see makeRecord(arg1, arg2, ... argN) is as follows: 1. The "arg1, arg2, ... argN" part gets handled as a chain of pair constructions, resulting in a single expression. 2. We then recognize _(_) as the mixfix syntax for application. Doesn't matter whether you are applying a value constructor or a function. I have a vague memory that a later fix-up pass turns this back into native arity-k application, but I'm not actually sure about that; we may have just left it as-is. shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
