[m-dev.] for review: improve higher-order syntax
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Feb 17 00:04:04 AEDT 2000
On 16-Feb-2000, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> Just one question, should the following code parse
>
> { Result2 = 5 `(func(X, Y) = X + Y)` 6 },
According to the language reference manual as it current
stands now, no; in a `backquote` infix operator, the operator
between the backquotes must be either a name or a variable.
As a matter of language design? Well, that is a more
difficult question... but my first impression is that
I'm satisfied with the current rules for backquoted
infix operators. I don't think the code above is
very readable, and I can't really imagine any good
use of backquoted expressions. Besides, if you allow
that, then you start getting into nasty issues of
nesting and precedence: do backquotes nest?
{ Result2 = 5 `(func(X, Y) = X `plus` Y)` % allowed?
{ Result2 = 5 `func(X, Y) = X `plus` Y` % allowed?
% if so, how does it get
% parenthesized?
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- 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