[plt-scheme] instantiating another instance of same class

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed Apr 9 09:28:00 EDT 2003

You can use design patterns to do this (eg for 3. use factory method)
and you could even build macros on top of the class system that build
this kind of thing in, using the design patterns. I don't believe that
there is any native support for it, however.


At Wed, 9 Apr 2003 08:55:52 -0400, "Neil W. Van Dyke" wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> Is there a way to do any of the following with the object system
> (in decreasing order of generality)?
>   1. Procedure that accepts an object instance and returns the object
>      class.
>   2. Way to get the most specific class of an instance from within a
>      method of the instance.
>   3. Way from within a method to make a new instance of the instance's
>      class, with specified init fields.
> -- 
>                                              http://www.neilvandyke.org/

Posted on the users mailing list.