[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fun-O Basic Edition Compiler



Scott McKay wrote:

> I realize that the following logical fallacy is so widespread that it
> gets its own name -- "appealing to an authority" -- but here goes.
> 
> No less a language designer than Guy Steele, when asked what
> he thinks should be in all modern languages, one of the five or so
> things he mentioned was that there's "no excuse" (his words) for
> any modern language not to transparently handle overflows from
> small to large integers.
> 
> The devil's in the details, though.  I think that to get this right, the
> programmer should use the "bignum" library and be rewarded with
> this transparency.  If you don't use bignums, then all overflows should
> be detected and an error should be signalled.  For operations that
> wrap, you should be required to use a different operator; ordinary
> operators like +, -, and * should always be "conservative".

I agree with all of the above, except that I'm not sure it should be the 
operators that wrap.  A nonstandard type such as <machine-integer> could 
also be used.