[mercury-users] Suggestion: new operator
Ralph Becket
rbeck at microsoft.com
Thu Oct 19 21:33:12 AEDT 2000
We now have a selection of infix operators for common tasks (`^' for
field access, `++' for concatenation etc.) I propose adding `@' as a
synonym for `lookup' operations:
Map @ Key <=> map__lookup(Map, Key)
String @ Idx <=> string__unsafe_index(String, Idx)
Array @ Idx <=> array__lookup(Array, Idx)
etc.
Conceivably one could also overload `:=' to handle `set' operations...
Good idea? Bad idea?
--
Ralph Becket | MSR Cambridge | rbeck at microsoft.com
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list