[mercury-users] mercury website (was Suggestion: new operator )

Ralph Becket rbeck at microsoft.com
Fri Oct 20 20:52:01 AEDT 2000


>From Mattias Waldau on 20/10/2000 09:07:46
> why invent a new operator not found in any other language? is this to try
to
> make the language as obscure as possible?

To the contrary.  The idea is to supply lexically small, intuitive operator
symbols for the most common operations.  It makes sense to try to reduce the
amount of verbiage necessary for such things.  Since the number of common
operations is small, the burden of learning required is also small.

> the only standard is [ ],

Mercury is a bold, brave, new language unafraid to challenge the received
wisdom :)
 
> > Map @ Key     <=> map__lookup(Map, Key)
> > String @ Idx  <=> string__unsafe_index(String, Idx)
> > Array @ Idx   <=> array__lookup(Array, Idx)
> 
> should be
> 
> Map[Key]
> String[Idx]
> Array[Idx]

This would require a major change to the parser and require the programmer
to
grok yet another bit of syntax and the meaning behind it.

> If we cannot use brackets, we should use functions and predicates.

Do you object to the other infix operators or are they okay?

Ralph

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