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

Re: Common Lisp solved this problem 20 years ago



Marcin 'Qrczak' Kowalczyk wrote:
Declaring types of identifiers is not enough, because it can't express
the wish to ignore any fixnum overflow and assume that the result will
fit in a fixnum.

The C world has recently woken up to the problem of integer overflow. I used to think, "hah, if only they had used Scheme". Now we are proposing to include this problem in the *core* of Scheme.

Look, the core of Scheme should favor correctness over efficiency. The core of scheme should define addition on two integers to yield the sum, not the sum modulus some unknown constant.

Yes, fixnum modular arithmetic can be useful in some circumstances. But, please, shunt it off into the library.

Regards,

Alan
--
Dr Alan Watson
Centro de Radioastronomía y Astrofísica
Universidad Astronómico Nacional de México