[plt-scheme] swindle and custom struct

Eli Barzilay eli at barzilay.org
Thu Sep 6 21:48:33 EDT 2007


On Sep  6, YC wrote:
> Thanks Will!  I tried it and it works ;) except the generic make method -
> i.e. can't do (make <my-struct> ...).
> 
> After looking at the defstruct code - it appears that it calls a private
> function called struct-type->class* and this function builds on top of
> struct-type->class and use it to track the slots for all the types created
> via defstruct and thus allow the structs to be created via made.
> 
> I guess to fully integrate with the make method the function
> struct-type->class* should be exported...?

The classes that you get from `struct-type->class' are intended for
generic function dispatching only.  Making <make> work with these will
require much more work.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


More information about the plt-scheme mailing list