[racket-dev] small changes, some slightly backward-incompatible

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Oct 8 21:10:13 EDT 2010

Version 5.0.1.8 includes a potpourri of changes, some of which create
minor backward incompatibilities:

 * The new `flonum?' predicate is a synonym for `inexact-real?' with
   the default configuration of Racket, but `--enable-floats' is back
   in working order, and a 32-bit float is not a flonum. All of the
   `fl' functions require a flonum. Uses of `inexact-real?' that
   protect uses of `fl' operations (especially unsafe ones) should
   switch to `flonum?'.

 * A delimiter must appear after `#t' or `#f' at the `read' level.
   For example, `(list #t1)' used to be the same as `(list #t 1)',
   but now it's a syntax error.

   This change bleeds through to the R5RS language. I don't think R5RS
   requires an undelimited `#t' or `#f' to work, but let me know if
   that's not the case. (R6RS definitely requires a delimiter, but
   that's a different reader.)

 * `#true' and `#false' are now reader alternatives for `#t' and `#f'
   (which is why `#t' and `#f' must be delimited).

 * A `print-boolean-long-form' parameter controls whether `#t' and `#f'
   print as `#t' and `#f' or as `#false' and `#true'. For now, the
   parameter is off by default (but see other thread).

 * A new `read-accept-lang' parameter controls whether `#lang' or `#!'
   is accepted. Both `read-accept-reader' and `read-accept-lang' must
   be true for `#lang' or `#!' to work. Of course, `read-accept-lang'
   is turned on automatically while reading a module file.

   The idea behind this change is that you may want `#reader' enabled
   at a REPL, but you probably don't want `#lang' enabled in the REPL.
   People get confused when they try to use `#lang' in the DrRacket
   REPL, for example.

   The `read-accept-lang' parameter is true by default, so
   `read-accept-reader' effectively controls `#lang' reading as before,
   but the default `current-read-interaction' procedure (as used by the
   `racket' REPL) sets `read-accept-lang' to #f.



Posted on the dev mailing list.