[plt-scheme] instantiating another instance of same class

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Apr 9 12:11:55 EDT 2003

At Wed, 9 Apr 2003 09:51:33 -0400, "Neil W. Van Dyke" wrote:
> I am curious as to the rationale for not being able to ask the class of
> object.  I realize you guys have knowingly avoided Smalltalk-like
> metaclasses, but the `class*' and `instantiate' syntax suggest that
> classes are first-class [pun] values, and one can test an instance
> against a given class predicate.  This is a significant theoretical
> distinction, but I'm curious as to whether there's a significant
> performance or flexibility win.

We don't want to hand out the ability to instiantiate a class whenever
we hand out an instance of the class.

Recently, we added an inspector-sensitive `object-info' method, which
does return the class of an object --- but only if you have a
sufficiently powerful inspector.

Matthew



Posted on the users mailing list.