[plt-dev] Inexact integers

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat May 22 20:28:22 EDT 2010

At Sat, 22 May 2010 17:52:19 -0400, Sam Tobin-Hochstadt wrote:
> On Sat, May 22, 2010 at 8:56 AM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
> > On Fri, May 21, 2010 at 9:32 PM, David Van Horn <dvanhorn at ccs.neu.edu> wrote:
> >> I talked with the PLTers who attended TFP and it was agreed that inexact
> >> integers, a holdover from Scheme standards, are counter intuitive.  I wonder
> >> if it is worth doing away with them in Racket?
> >
> > Maybe in a later release. But the design of the number hierarchy is
> > complex so if we were to contemplate such a thing, the proposal would
> > probably have to be more concrete. (After all, we dno't want to do
> > away with something float-like completely, for performance reasons.)
> 
> First, the change to racket is a new language, and thus an opportunity
> for things to be different.  Future releases won't have this
> opportunity.

Our experience evolving "PLT Scheme" suggests otherwise.

> Second, here's a concrete proposal: in `racket/base' and all derived
> languages, `integer?' means what `exact-integer?' means in
> `scheme/base'.  `scheme' and `scheme/base' stay the same.  No other
> changes are made to the number hierarchy.

I think it will take more than a couple of `rename-out's in `provide'
forms. Error messages from primitives, for example, embed the "integer"
and "exact integer" terminology.

It's a good idea, but it will take some time to experiment and iron out
the kinks, so it's not a good candidate for a v5.0 change. (At this
point, of course, practically nothing is a good candidate for a v5.0
change.)



Posted on the dev mailing list.