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?

They cause a mess with the types in Typed Scheme (IME) and lead to bugs in contracts and code. For example, the contract on `text' in 2htdp/image says the font size argument is an `integer?', but really it should be `exact-integer?'. For example:

   #lang racket
   (require 2htdp/image)
   (text "hi" 12.0 'black)

This gives:

find-or-create-font in font-list% (family id case): expected argument of type <exact integer in [1, 255]>; given 12.0

David
_________________________________________________
 For list-related administrative tasks:
 http://list.cs.brown.edu/mailman/listinfo/plt-dev

Reply via email to