Subject: Re: MOP:CLASS-PROTOTYPE
From: rpw3@rpw3.org (Rob Warnock)
Date: Fri, 18 Jul 2003 03:12:33 -0500
Newsgroups: comp.lang.lisp
Message-ID: <soydnTbjysRsNoqiXTWc-w@speakeasy.net>
Christophe Rhodes  <csr21@cam.ac.uk> wrote:
+---------------
| What is the expected behaviour when MOP:CLASS-PROTOTYPE is called on a
| built in class?  ...  it would seem to be most
| useful if it returned a direct instance of a class; though this isn't
| spelt out in AMOP, I think it's implied.  However, for built in
| classes, no such direct instances need exist; for instance, in an
| implementation where INTEGER, BIGNUM and FIXNUM are all classes, there
| are no direct instances of INTEGER.
| 
| Is there established practice in this area?
+---------------

Well, FWIW, CMUCL offers up some amusing ad-hoc values:    ;-}  ;-}

	cmu> (mapcar (lambda (x) (pcl:class-prototype (find-class x)))
		     '(integer bignum fixnum ratio real complex))

	(1 42 42 1/2 42 #C(1 1))
	cmu> 


-Rob

-----
Rob Warnock, PP-ASEL-IA		<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607