[m-dev.] Re: [m-rev.] field syntax (was: smart recompilation)

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Jul 6 21:09:02 AEST 2001


On 06-Jul-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> On 06-Jul-2001, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> > But if you want to make the rule that you must *always* define 'foo :=' when
> > you define '= foo', and enforce that in the compiler, I could live with
> > that, because I can understand it.  It also means that if I see ^ used to
> > access something, I know I can use := to set it, which is useful information.
> > I'd be disappointed to lose the general pipe-like syntax, but I doubt it's
> > important enough to grab another operator for.
> 
> I think the general pipe-like syntax is nice enough that we should at
> least *explore* the idea of grabbing another operator for it.

`|' would be nice, but unfortunately that's taken.
Anyway, there's a shortage of single-character operators, and I don't
think this is important enough for that, so I'd recommend a two- or
three-character operator name.

'$|', which I have seen used in Haskell code, would also be OK,
but unfortunately that lexes as two tokens, not one.
The only characters which can be combined to form operators without
changing the lexical syntax are the following:

	# $ & + - . / : < = > ? @ ^ ~ \

But I guess "$>" would work.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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