Re: Common Lisp solved this problem 20 years ago Per Bothner 25 Oct 2005 19:21 UTC

Marcin 'Qrczak' Kowalczyk wrote:
> Alan Watson <xxxxxx@astrosmo.unam.mx> writes:
>
>
>>I aplaud this goal. However, rather than create this horrid mess of
>>type-specific operators, I would much prefer an approach that used
>>type declarations, perhaps:
>>
>>   (with-flonum (x y) (/ x y))
>>   (with-fixnum (n m) (* n m))
>
>
> 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.

It can - if we define it appropriately.  For example as in my
earlier proposal.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/