[m-dev.] for review: improvements for record syntax

Peter Schachte schachte at cs.mu.OZ.AU
Fri Dec 8 13:37:36 AEDT 2000


On Fri, Dec 08, 2000 at 11:28:47AM +1100, Fergus Henderson wrote:
> > I don't see how you could ever implement policy (1) without the function
> > name restriction.
> 
> Well, you just do the transformation as a syntactic transformation.
> If you see `Term1 ^ Var(Term2)', you replace it with `Var(Term1, Term2)'.

Well, OK, I guess it's actually a no-currying-allowed restriction (which is
not checkable unless you also make the function name restriction).  If Var
is bound to the closure matrix_elt(3), then Term1 ^ Var(5) expands to
Var(Term1, 5), which is really matrix_elt(3, Term1, 5).  But it *should* be
matrix_elt(Term1, 3, 5), if it were really inserting the term before the `^'
as the first argument of the second argument.

> > That's why I'm flip-flopping to support policy (2)
> > now.  I think there is more to be gained by allowing first-class values
> > on the right of ^ (even if not immediately) than is lost by a somewhat
> > confusing argument order on accessor and setter functions.
> 
> OK, you've convinced me.

Cool.  Is this a quorum?  Can this feature go into the Rudolph release?

-- 
Peter Schachte <schachte at cs.mu.OZ.AU>  Never doubt that a small group of
http://www.cs.mu.oz.au/~schachte/      thoughtful committed citizens can
Phone:  +61 3 8344 9166                change the world, indeed it's the
Fax:    +61 3 9348 1184                only thing that ever has. -- Margaret
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list