[m-dev.] Re: [m-rev.] field syntax (was: smart recompilation)
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jul 6 21:55:53 AEST 2001
On 06-Jul-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> > From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> > Sent: 06 July 2001 12:09
> >
> > `|' 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.
>
> That's a moot point... I'd be inclined to go for '$'.
I think that would be confusing, at least for Haskell programmers,
since Haskell uses $ for function composition. It would be making
things unnecessarily difficult to define that as *reverse* function
composition.
And I also have the same objection as for `|', i.e. I don't think
this operator is important enough to steal one of the last remaining
single-character operators.
> > '$|', which I have seen used in Haskell code, would also be OK,
>
> Ugh.
I think that's quite nice, since it is reminiscent of both Haskell's
function composition operator and the Unix pipe operator.
> > 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.
>
> Could we reuse '-->'?
We could, but I wouldn't recommend it -- I think that would be confusing.
Also it probably doesn't have the right precedence.
--
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