[m-dev.] Introduce !! rather than ^elem() for indexing

Ralph Becket rafe at cs.mu.OZ.AU
Tue Oct 9 10:32:50 AEST 2001


I believe that Haskell uses !! to access array members (and possibly
list members etc. too).

`A !! I' is syntactically more economical than the current Mercury
convention of using `A ^ elem(I)'.  However, to make substitution of
the form `A !! I := X' parse would require some work.

If there is support for !!, it seems to me that it might be a better
idea to generalize the parser to recognize `op(...) := X' as syntactic
sugar for `'op :='(..., X)'.

Any takers?

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