This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Confusing error message


On 04/17/2011 05:58 AM, Helmut Eller wrote:
* Per Bothner [2011-04-17 07:04] writes:

Technically the "integer" type should probably be renamed "exact-integer"
- that would be more compatible with R6RS and the just-released R7RS draft.

In Kawa, all integers are exact, right? If so, then "exact-integer" is IMO unnecessary confusing.

Well, following RnRS terminology 3.0 is an inexact integer.


(integer? 3.0) ==> #t

The new R7RS draft has a separate exact-integer? procedure to capture
the intersection of integer and exact.

Generally in Kawa, a type predicate (T? x) is equivalent to
(instance? x T).  However, that is not the case for T==integer.
That's a little unfortunate.  We could fix that irregularity by
renaming the integer type to exact-integer, and changing integer
to have the RnRS meaning.  However, that means people would have to
update their code to change integer to exact-integer (or suffer some
performance-loss).  Plus it's not clear why you'd ever want to
use integer in the RnRS sense as a type-specifier.

So my inclination is to just note the inconsistency.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]