[plt-scheme] 299.14

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Aug 25 11:16:15 EDT 2004

The v299-tagged code in CVS for MzScheme and MrEd is now version 299.14.

This version completes the module-security changes that started in
version 299.13:

 * As promised, `fluid-let-syntax' is gone. But the new MzLib library
   "stxparam.ss" provides the `define-syntax-parameter' and
   `syntax-parameterize' forms, which can be used instead.

   I recommend defining keywords as syntax parameters instead of
   creating macros that non-hygienically introduce identifiers. For
   example, instead of writing a `loop' macro that introduces a
   capturing `exit' binding, write

    (define-syntax-parameter exit (lambda (stx)
                                    (raise-syntax-error
                                     #f
                                     "illegal outside of loop"
                                     stx)))

     (define-syntax loop
       (syntax-rules ()
        [(_ body0 body ...)
         (let/ec the-exit
          (syntax-parameterize ([exit (syntax-rules ()
                                       [(_ v) (the-exit v)])])
             (let loop () body0 body ... (loop))))]))

   If you prefer to keep the parameter-ness of `exit' private (so that
   others cannot use `syntax-parameterize' on `exit'), then define
   `real-exit' as the parameter, use it in the expansion of `loop', and
   define `exit' as

    (define exit (make-parameter-rename-transformer #'real-exit))

 * Removed `class*/names' from the "class.ss" library.

   The `class*/names' form allowed the programmer to specify names to
   be bound instead of `this', `super-new', etc. inside a class,
   whereas the `class*' and `class' forms non-hygienically introduced
   those names. Thus, macros that would naturally expand to `class' or
   `class*' had to expand to `class*/names', instead, because expanding
   to a non-hygienic macro usually does not work.

   As of 299.14, `this', `super-new', etc. are exported by the
   "class.ss" library, and they are built in terms of syntax
   parameters. So, these keywords work as expected, and macros can
   easily and correctly expand to uses of `class' and `class*'.

 * Completed `syntax-recertify', `syntax-recertify-constrained?', and
   `syntax-extend-certificate-env', added `make-syntax-certificate-env'
   and `syntax-certificate-env?', and fixed many certificate-related
   bugs. 

   I'll discuss these more in a separate message.

 * Added `hash-table-copy'.

 * Changed `display' for paths to drop the "#<path:...>" wrapper.

 * Changed #; for top-level read so that graph assignments are
   forgotten before reading the next expression. Otherwise, if you have
   the sequence

    #0=(1 . #0#)
    #0=(1 . #0#)

  and you comment out the first one,

    #; #0=(1 . #0#)
    #0=(1 . #0#)

  the #0= in the second line counts as a duplicate binding of #0#,
  which is not what you'd expect.

 * Added `rename-transformer-target'.


Temporary docs are in the usual place:

 http://www.cs.utah.edu/~mflatt/tmp/mzscheme-doc.plt
 http://www.cs.utah.edu/~mflatt/tmp/mzlib-doc.plt
 http://www.cs.utah.edu/~mflatt/tmp/mred-doc.plt
 http://www.cs.utah.edu/~mflatt/tmp/insidemz-doc.plt


Matthew



Posted on the users mailing list.