[plt-dev] some Racket proposals & implementation

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Apr 3 20:20:42 EDT 2010

At Sat, 3 Apr 2010 15:23:36 -0600, Jay McCarthy wrote:
> Would we want to use this as the
> default define-struct in #lang racket? Or should I put this in
> unstable or on planet?

The `racket' language should probably have the same `define-struct' as
in `racket/base' --- and one thing to keep in mind for things that
might go into `racket/base' is that the footprint of the implementation
can matter.

At the moment, the difference between

 #lang scheme/base
 ;; (require "sstruct.ss")

with and without the commented line:

                       from source           from .zo
                       time    mem          time  mem
  without sstruct      51ms    2.2MB        45ms  2.0MB
  with sstruct        224ms    9.6MB       184ms  9.3MB

Changing "sstruct.ss" to build on `scheme/base' instead of `scheme'
lowers the overhead somewhat, but not much, since "sstruct.ss" uses
many libraries at compile time. Turning that around, switching the
program above from `scheme/base' to `scheme' has a comparable effect on
the program as using "sstruct.ss", and then using "sstruct.ss" is a
relatively small additional overhead.

Arguably, at least in the .zo case, the blame for the overhead belongs
to our approach of building up language towers instead of a more
conventional bootstrapping process. I think the simplicity of language
towers has generally been a win, and it only seems like a problem to me
when I'm implementing parts of the core.

Posted on the dev mailing list.