Newsgroups: comp.lang.dylan
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.acsu.buffalo.edu!dsinc!spool.mu.edu!howland.erols.net!netcom.com!netcom9.netcom.com!haahr
From: haahr@netcom.com (Paul Haahr)
Subject: Re: Dylan's future
In-Reply-To: lyman@cc.gatech.edu's message of 1 Oct 1996 23:38:37 -0400
To: lyman@cc.gatech.edu (Lyman S. Taylor)
Message-ID: <HAAHR.96Oct2102111@netcom9.netcom.com>
Sender: haahr@netcom9.netcom.com
Organization: NETCOM On-line services
References: <324CEE88.5120@euronet.nl> <52lme3$5os@trumpet.uni-mannheim.de>
	<52rmqj$gf2@cantaloupe.srv.cs.cmu.edu>
	<52s6jt$bm0@trumpet.uni-mannheim.de> <52so3t$48q@pravda.cc.gatech.edu>
Date: Wed, 2 Oct 1996 17:21:11 GMT
Lines: 33

Marc Wachowitz <mw@ipx2.rz.uni-mannheim.de> wrote:
> >Thus, assuming that integer or float are common cases,
> >one can create inline code for such cases, and do the general case if

Lyman S. Taylor <lyman@cc.gatech.edu> wrote:
> Dylan has bignums so even integer is still an "abstract" class.

Dylan might have bignums, depending on the implementation, but there's
no such requirement in the core language.  All that's required, as I
recall, is that <integer> be at least 28 bits;  that is, support the
range -(2 ^ 27) to (2 ^ 27) - 1.  Bignums are, of course, permitted.

But they must not produce a mathematically incorrect result.  That is

  $fixnum-positive-infinity + 1

must either signal an error or roll over into bignums.  Silent overflow
to some arbitrary integer value isn't allowed.  Nor is modulo 2^n
arithmetic.

> This makes things a tad more tricky than simple turning  
> 
>		a + b ;
> 
> into 
>		ADD R2 R2 R3 ; or the equivalent Assembly/binary.

Yep, on many architectures, one needs an extra instruction to check that
the result didn't overflow.

I agree with all the other stuff you wrote.

Paul
