[m-dev.] @ syntax (was: Freeze the compiler)

Peter Ross peter.ross at miscrit.be
Tue Nov 14 20:48:21 AEDT 2000


On Tue, Nov 14, 2000 at 01:52:19PM +1100, Fergus Henderson wrote:
> It seems a bit excessive to have _four_ different syntaxes for
> accessing array elements:
> 
> 	1. lookup(Map, Key)
> 	2. Map `lookup` Key
> 	3. Map ^ elem(Key)	and	Map ^ elem(Key) := Value
> 	4. Map @ Key
> 
> I supposed we could combine 3 & 4 as
> 
> 	   Map ^ @(Key)		and	Map ^ @(Key) := Value
> 
> or (making `@' a prefix operator)
> 
> 	   Map ^ @ Key		and	Map ^ @ Key := Value
> 
> However this would have the drawback that the space between the `^'
> and the `@' would not be optional, which could well be confusing for
> beginners.
> 
I much prefer the 3rd option, the 4th is just a bit too cryptic for me.

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