[m-rev.] Added int:'/'/2 and builtin false/0
Simon Taylor
stayl at cs.mu.OZ.AU
Tue May 21 16:03:17 AEST 2002
On 21-May-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 21-May-2002, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > 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?
>
> Well, actually we don't know what the user was trying to do;
> maybe they were trying to do int / int => float.
In which case they will get an error when they try to use the
`int' result as a `float'. This is the sort of mistake a
programmer makes once, and never again.
> But the reason for using // rather than / is mainly for the *readers*
> of the code rather than the writer.
There's no inconsistency that needs special attention.
All of the binary arithmetic operators take two arguments
of a type and return a value of the same type.
Simon.
--------------------------------------------------------------------------
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