[plt-scheme] Re: Serializable class.ss generics

From: Evangelos Tsagkas (lunluc at gmail.com)
Date: Mon May 8 18:48:24 EDT 2006

On 5/8/06, Evangelos Tsagkas <lunluc at gmail.com> wrote:
> Hi all,
> is there a way I can serialize the result of (make-generic %-or-<%> symbol) ?
> Evangelos

I take it that I cannot serialize the (internal) generic struct that's
returned (it's not considered top-level, is it?)

So I 've taken the route which involves creating a serializable
structure that encapsulates the arguments to (make-generic ...). I can
then create the generic at run-time. However, since I cannot create
serializable interfaces (or can I?) one of the arguments will be the
*name* of the interface to pass to the generic's constructor. How can
I then retrieve the run-time binding of that interface name from the

[for the blah-blah-challenged...]

(define-serializable-struct gen (%-or-<%> method))
(define m (make-gen 'person<%> 'say-hello))
(define mm (deserialize (serialize m)))

   (?exp? (namespace-symbol->identifier
                  (gen-%-or-<%> mm)))
   (gen-method mm))

I guess I need something in ?exp? but can't figure out what. Unless
I'm totally off my head here :-)


if feeling is first who pays any attention to the syntax of things
will never wholly kiss you
-- ee cummings

Posted on the users mailing list.