4 ms·
The author provides a good example of legitimate use of change-class with his compiler example. About violating "some earlier architectural plan" in the case o
by jlg23 11y ago
The author provides a good example of legitimate use of change-class with his compiler example.
About violating "some earlier architectural plan" in the case of libraries: Being able to do this allows CL programmers to freely mix libraries with different "architectural plans" without resorting to some half-baked fusion architecture that has to account for the different styles used by the libraries.
Last but not least, change-class is not a hack - it's behavior is well defined and documented. And when you consider that CL's "object orientation" is more generic that c++'s or java's, based on generic methods alone, inferring from c++- or java-paradigms to good CL style just does not work. Peter Seibel's talk "Practical Common Lisp" at google explains that pretty well: https://www.youtube.com/watch?v=VeAdryYZ7ak https://www.youtube.com/watch?v=VeAdryYZ7ak