[m-dev.] for review: tuples [1]

Erwan Jahier Erwan.Jahier at irisa.fr
Mon Aug 14 18:40:37 AEST 2000


| On 11-Aug-2000, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
| > On Sun, Aug 06, 2000 at 02:36:59PM +1000, Simon Taylor wrote:
| > > >     2)  Much more orthodox notation mathematically (Using parentheses for
| > > > 	tuples is only a little less common than angle brackets; they're
| > > > 	certainly a *lot* more orthodox than braces).
| > > Not using parentheses was a deliberate decision so that unary tuples work
| > > when passed to a predicate which takes a polymorphic argument which is
| > > expected to be a tuple of any arity. If unary tuples don't work, then the
| > > arity needs to be passed separately so that the unary case can be handled
| > 
| > Ok, but braces just don't *look* right for tuples.
| 
| I think that is a matter of familiarity as much as anything.

I remember the time when I was new to logic programming, with my mathematical
background, I was very disappointed by the fact the all those declarative
(mathematical ?) languages where not using the usual notations that people were
using for centuries. 

Ok, maybe Mercury don't target scientific calculus or statistic peoples (or
even just beginners to programming that only know the math syntax) they are all
using Fortran anyway. But still, since most of them (at least, the ones I know)
did not receive a solid computer science training, a language like Mercury that
performs all kind of optimisations automatically can be nice for them.
Moreover, I'm pretty sure that Mercury can charm them because of its
"mathematical" (functions, logic, quantifiers, ...) syntax. Certainly it is not
always possible to match a computing language syntax with the usual
mathematical one; but when it is possible, it should be the case IMHO.

| But Mercury would not be the first language to use braces for tuples:
| that's what Erlang uses.

...
-- 
R1.


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