[m-dev.] Suggestion for a new "where" operator
    Peter Schachte 
    schachte at cs.mu.OZ.AU
       
    Mon Aug  4 15:14:00 AEST 2003
    
    
  
> The idea is that an expression (E where G) denotes the expression E
> computed using the goal G.
Sounds like a great idea.
Suggestion:  make the precedence of 'where' higher (lower number) than
'=', so you could write
	f(X) = Y where ....
I think this is prettier than
	f(X) = Y :- ....
The only problem with this is syntactic:  people will tend to write
	X where p(X), q(X)
instead of
	X where (p(X), q(X))
and no doubt the error message they get will not immediately help them
realize the simple precedence problem.
-- 
Peter Schachte              If a nation values anything more than freedom, it
schachte at cs.mu.OZ.AU        will lose its freedom; and the irony of it is that
www.cs.mu.oz.au/~schachte/  if it is comfort or money that it values more, it
Phone: +61 3 8344 1338      will lose that too. -- Somerset Maugham 
--------------------------------------------------------------------------
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