[mercury-users] Syntactic sugar for higher order types and mo des
Tyson Dowd
trd at cs.mu.OZ.AU
Wed Jul 26 13:17:26 AEST 2000
On 26-Jul-2000, Richard A. O'Keefe <ok at atlas.otago.ac.nz> wrote:
> Tyson Dowd suggests changing the mode operator ->
>
> For backwards compatibility we could accept :: and -> for a while, but
> if using == some other operator should be used. Wouldn't `-' work OK?
>
> :- mode foo == free - ground.
> :- mode foopair == (free - ground) - (ground - ground).
>
> '-' really doesn't suggest sequence; if anything I'd expect Later-Earlier.
> One possibility is to use a word:
> :- mode foo == free then ground.
> :- mode foopair == (free then ground) - (ground then ground).
Actually in this case it would be
:- mode foopair == (free - ground) then (ground - ground).
So perhaps this proves your point that the `-' syntax isn't suggestive
enough.
But I think `then' has a higher precedence than `==' so that's not going
to parse very nicely.
> Another possibliity is to use >>
> :- mode foo == free>>ground.
> :- mode foopair == free>>ground - ground>>ground.
`>>' has the right precedence already, and isn't a bad choice.
:- mode foo == free >> ground.
:- mode foopair == (free - ground) >> (ground - ground).
I'd be perfectly happy with this.
> Whatever is chosen, I think it should suggest by its name or its form
> which state is "before" and which is "after".
--
Tyson Dowd #
# Surreal humour isn't everyone's cup of fur.
trd at cs.mu.oz.au #
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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