Re: MOP question for language lawyers: can you specialize on standard-class
"Didier Verna (as didier at didierverna dot net)" <[email protected]> Mon, 18 May 2026 10:57:35 +0200
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
"Tim Bradshaw (as tfb at cley dot com)" <[email protected]> wrote: > (what on earth is change-class & its machinery doing there? Don't > answer: I know it is often used in the implementation of CLOS, but > that is *not* a reason for it to exist at the user level.) and doesn't > contain things that it should (I'd suggest sealing). CHANGE-CLASS at the user level is extremely useful, in particular to compensate for the only problem CLOS has that you really can't work around, namely equivalence between types, in the behavioral sense, and classes, in the implementation sense (this is a deficiency of almost all traditional object systems). E.g. https://en.wikipedia.org/wiki/Circle%E2%80%93ellipse_problem and this solution (look for slides 29 -- 32): https://www.didierverna.net/lectures/paradigms/aop/05_advanced_clos.en.pdf I also find it very convenient as a form of optimization, allowing you to extend the capabilities of objects in-place (say, after acquiring more information about them), as opposed to having to create new objects based on the old ones. -- Resistance is futile. You will be jazzimilated. Lisp, Jazz, Aïkido: http://www.didierverna.info _______________________________________________ Lisp Hug - the mailing list for LispWorks users [email protected] http://www.lispworks.com/support/lisp-hug.html