[m-dev.] Re: Character constants feature

Michael Day mcda at cat.cs.mu.OZ.AU
Mon Dec 20 11:12:41 AEDT 1999


> The choice of a Prolog-like syntax has both advantages and
> disadvantages ;-)

It seems at this point, now that Prolog is no longer needed for
bootstrapping or debugging, that there are more disadvantages than
advantages to sticking rigidly to every aspect of Prolog syntax.

> It wouldn't be too hard to change this, so that putting something
> in single quotes prevented it from acting as an operator.
> But that would make Mercury's syntax different from Prolog.
> It's not clear that tweaking minor details like this one
> would be worth it.

Given that it violates the expectations of a vast number of non-Prolog
programmers (and a few Prolog programmers too I would guess) and that
Mercury syntax is already deviating from that of Prolog it seems worth
considering.

test.m:012: Syntax error at token '.': operator precedence error.
test.m:013: Syntax error at token ',': operator precedence error.
test.m:014: Syntax error at token '+': operator precedence error.
test.m:015: Syntax error at token '-': operator precedence error.
test.m:016: Syntax error at token '*': operator precedence error.
test.m:017: Syntax error at token '^': operator precedence error.
test.m:018: Syntax error at token ';': operator precedence error.
test.m:019: Syntax error at token '<': operator precedence error.
test.m:020: Syntax error at token '>': operator precedence error.
test.m:024: Syntax error at token '=': operator precedence error.
test.m:025: Syntax error at token '/': operator precedence error.
test.m:029: Syntax error at token '~': unexpected token at start of (sub)term.
test.m:033: Syntax error at token '&': operator precedence error.
test.m:037: Syntax error at token '\': unexpected token at start of (sub)term.

Will this list grow longer as more operators are added?

Michael

--------------------------------------------------------------------------
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