Re:A Brief Guide to CLOS (1998)
by aidenn0 on Monday September 24, 2018 @10:49AM
(#18058141)
Another revelation with CLOS is methods are not namespaced to classes. Before I used CLOS it was not obvious that methods were serving two distinct purposes (specialization and namespaces) within other OO languages.
Interestingly enough, most OO systems for lisp older that CLOS were much more smalltalk like in this sense, so there were several people that found the non-namespaced approach to methods to be superior.
I'm honestly not yet convinced they are superior, but they are clearly more generic, in that it is trivial to implement single-dispatch message-passing style methods in CLOS, but much harder to do the reverse (several patterns in the GoF book exist just to emulate multiple dispatch).
Re:A Brief Guide to CLOS (1998)
by lispm on Monday September 24, 2018 @11:46AM
(#18058664)
But it's more difficult to redirect all/most messages to a class/instance to another class/instance. Especially if there is no message passing going on ...
Interestingly enough, most OO systems for lisp older that CLOS were much more smalltalk like in this sense, so there were several people that found the non-namespaced approach to methods to be superior.
I'm honestly not yet convinced they are superior, but they are clearly more generic, in that it is trivial to implement single-dispatch message-passing style methods in CLOS, but much harder to do the reverse (several patterns in the GoF book exist just to emulate multiple dispatch).