[m-rev.] Added int:'/'/2 and builtin false/0

Tyson Dowd trd at cs.mu.OZ.AU
Tue May 21 09:21:33 AEST 2002


On 20-May-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 20-May-2002, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> > I just think that '//'/2 is an anachronism that makes Mercury harder for
> > newcomers to read and understand
> 
> Calling it an _anachronism_ would imply that there was some reason
> which justified its used in the past but which is no longer valid.
> I don't think that is the case.  AFAIK the reasons for choosing '//'
> rather than '/' are just as valid now as they ever were.

Absolutely true.  I don't think there has ever been a strong argument
for using '//' and there still isn't one.

> 
> > (currently, if you inadvertently use
> > '/'/2, the compiler simply reports "error: undefined symbol `//2'",
> > which is really not very helpful if you don't know the history...)
> 
> It would be easy to provide a better error message...

error: you spelled Mississippi wrong.

If you know what the user was trying to do, and all you are going to do
is tell them how to do it right, why don't you just accept what they are
doing in the first place?

Or do you propose also adding a mini-lecture about numerical errors to
the error message?  Because I can think of a large number of preds and
funcs that need one more urgently than / of integers.

-- 
       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-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list