[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Another try on object creation
- To: Common-Lisp-Object-System@SAIL.STANFORD.EDU
- Subject: Re: Another try on object creation
- From: Patrick H Dussud <DUSSUD%Jenner%ti-csl.csnet@RELAY.CS.NET>
- Date: Wed, 2 Sep 87 16:37:17 CDT
- In-reply-to: Msg of Fri, 28 Aug 87 22:13 EDT from "David A. Moon" <Moon@scrc-stony-brook.arpa>
(defmethod make-instance ((class standard-class) &rest initargs)
(setq initargs (default-initargs class initargs))
(check-initargs class initargs)
(let ((instance (apply #'allocate-instance class initargs)))
(apply #'initialize-instance instance initargs)
instance))
(defmethod make-instance ((class-name symbol) &rest initargs)
(apply #'make-instance (symbol-class class-name) initargs))
I have a question: Why don't you use a class prototype to call
default-initargs and check-initargs?
Patrick.