[m-dev.] Freeze the compiler
Ralph Becket
rbeck at microsoft.com
Tue Nov 14 02:46:11 AEDT 2000
>From schachte at cs.mu.OZ.AU on 13/11/2000 13:58:45
>
> Three reasons. 1) It chains better: "X ^ foo(Y) ^ bar" looks clearer
> (to me) than "bar(foo(X,Y))" or "foo(X,Y) ^ bar". 2) It has the nice
> ':=' syntax to go with it. You don't have to wonder or remember how
> to change an attribute of a term that has a '^' accessor for it, you
> just use ':='. 3) Chained '^' works a lot better with ':=' than nested
> functions. "X ^ foo(Y) ^ bar := Z" looks clearer (to me) than
> "set_foo(X, Y, set_bar(foo(X, Y), Z))" (I think I've got it right now)
> or set_foo(X, Y, foo(X,Y) ^ bar := Z).
>
Okay, I think I'm convinced.
Map ^ image(Key)
Map ^ image(Key) := Value
Okay, I'll buy that. I think we should have X ^ f(A) ----> f(X, A)
since I also want to be able to pass around f(X) as an higher-order
value and I don't want a separate image/2 function for the purpose.
--
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