Nicolas Neuss <[EMAIL PROTECTED]> writes:
> I've run across an incompatibility of CMUCL/PCL with the ANSI spec, > namely that change-class does not accept key arguments for > initializing additional slots. > > Of course, there is a simple remedy, namely: > > (defun enhanced-change-class (instance new-class &rest initargs) > "Should not be needed if CMUCL/PCL would be ANSI conforming." > (let ((new-instance (change-class instance new-class))) > (apply #'initialize-instance new-instance initargs) I think you'll want reinitialize-instance here instead. > new-instance)) As Hannah has pointed out, this (long-known) problem has been fixed recently in the CVS repository, so I'll only comment on this bit: > But I wonder, why this incompatibility exists. Because CMUCL/PCL wasn't updated to reflect a late-stage change to the standard, i.e. originally change-class was spec'ed as implemented by CMUCL. Later-on people noticed that they were doing the change-class + reinitialize-instance combination fairly often, hence the spec was ammended (there is probably an ISSUE somewhere on this, maybe even in the HyperSpec). PCL was already being unmaintained at that time, so this wasn't updated, and we never got around to it, either... > Nicolas. Regs, Pierre.
