[self-interest] Unlimited integer arithmetics?

Viktor vi.ki at worldonline.cz
Sat Aug 24 13:17:23 UTC 2002


> > No, it was not my idea. I just think that it is not necessary to
hardwire
> > unlimited arithmetics into language and VM, because for nearly every
> > practical work is 64-bits enough. When user wants unlimited precision,
then
> > will use some library.
>
> What you've missed is that the *exact* thing necessary is that the
> user interface is neutral about integer size.

Yes, you are right.

> > Because I should implement it in VM, if it is a standard, and I am too
lazy.
> > That's true reason. 64-bit integers are much more easy for me.
>
> You seem quite ignorant of how this is usually done in Scheme or Lisp;
> Smalltalk has a different but equally workable strategy.

I don't know exactly what you mean by "strategy", but:

* there are "small integers", usually 32 bit values with on (LSB) bit
"sacred".
* when some operation with "small integers" is overflowed, then it is double
dispatched to method, which converts operand to "big integers" and result is
"big integer" too
* operations with "big integers" are performed by some library downloaded
from internet (LEDA, for example).

That's my "strategy". Did you mean something different?

Viktor







More information about the Self-interest mailing list