[Ecls-list] Problem with descendants of STANDARD-CLASS
Dan Corkill
dancorkill at comcast.net
Mon Feb 13 20:43:14 UTC 2006
> The problem with ECL is that it got a "castrated" version of CLOS which
> aimed for simplicity and easy bootstrapping. I am now reimplementing the
> parts of the MOP which were missing. Lot has been done:
> finalize-inheritance, change-class, etc. But there might be still some
> bugs left and there are definitely things to do such as reimplementing
> methods in a more standard way.
In investigating a GBBopen port to ECL, I found that the latest CVS
version of defclass does not allow additional class options associated
with a metaclass (see #+cant-assume-this below, in this excerpt from
defclass). Some mechanism (such as an option-validation method) needs
to be provided to allow class-option extensions.
> (dolist (option args)
> (let ((option-name (first option))
> option-value)
> (if (member option-name processed-options)
> (si:simple-program-error
> "Option ~s for DEFCLASS specified more than once"
> option-name)
> (push option-name processed-options))
> (setq option-value
> (case option-name
> ((:metaclass :documentation)
> (list 'quote (second option)))
> (:default-initargs
> (setf option-name :direct-default-initargs)
> (parse-default-initargs (rest option)))
> #+cant-assume-this
> (otherwise
> (si:simple-program-error "~S is not a valid DEFCLASS option"
> option-name))))
> (setf options (list* option-name option-value options))))
Also, I was surprised that only the following symbols were exported from
the CLOS package:
clos:slot-definition-documentation
clos:slot-definition
clos:slot-definition-allocation
clos:slot-definition-name
clos:slot-definition-initfunction
clos:slot-definition-initargs
clos:slot-definition-initform
clos:slot-definition-readers
clos:slot-definition-type
clos:slot-definition-writers
I expected that all the AMOP symbols would be exported.
-- Dan
More information about the ecl-devel
mailing list