[m-dev.] Freeze the compiler

Ralph Becket rbeck at microsoft.com
Mon Nov 13 20:13:23 AEDT 2000


>From Fergus Henderson on 12/11/2000 16:40:29
> On 10-Nov-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> > 
> > I presume the freeze would also apply to the library?  If so, I'd
> > like to check in the `@'-as-synonym-for-`lookup' change I've made
> > to my local copy (my interpretation of the debate was that many
> > people agreed it would be a good thing and those who didn't diverged
> > in several different directions).
> > 
> > Yea/nay?
> 
> I'd like to take a conservative approach and leave this one as is for now.
> 
> Peter Schachte's suggestion of making whatever syntax we use work
> with `:=' is a good one, i.e. providing support for what C#
> and (I think) Delphi call "indexers" in addition to our current
> support for "properties".  But I think that would require a syntax
> like `map^elem(Key)', which would be incompatible with the use of `@'.

Fair enough, although it seems orthogonal to me.  As I understand it,
the idea is to generalise from `X ^ Y' --> `Y(X)' to also handle
curried stuff, `X ^ Y(A, B, C)' --> `Y(A, B, C, X)' (+ `:=' case).

1. How would such syntax be declared?
2. Would it also work for, e.g., typeclass methods (that is, is this
just a syntactic transformation.)

Either way, lookup op's are very common and adopting the concise `@'
convention doesn't seem like too much hassle.

On the page, we get the following:

	lookup(Map, Key)
	Map ^ lookup(Key)
	Map @ Key

Ralph

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 

--------------------------------------------------------------------------
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