[m-dev.] Syntactic sugar for functor matching

Ralph Becket rafe at cs.mu.OZ.AU
Thu Nov 1 11:37:32 AEDT 2001


Thomas Conway, Wednesday, 31 October 2001:
> 
> I would argue that Mercury has quite enough syntactic cruft as it is!
> That's not to say that such a feature might sometimes be useful, but
> rather that the language contains lots of crufty syntax already, and
> we would probably be better of migrating to a cleaner syntax.

At the risk of rising to bait...

There is definitely a case to be made for improving Mercury's syntax.

After some consideration, however, there seems to me to be little
real difference between the syntax of Mercury and that of Haskell
(horrible to parse, but generally held to be rather elegant), other
than the inclusion of parentheses and commas where they might otherwise
be inferred.

The "extra" parentheses are typically very helpful to the newcomer.
I, and many of my peers, have only learned to parse Haskell visually
without too much pain after a few years spent poring over Haskell
papers.  This is generally not an issue with Mercury.

I would like to see a clean-up of the syntax and add proper support for
local predicate and function definitions.  If I manage to sketch
anything I'm happy with I'll post it for comments...

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