

A Brief Guide to the Common Lisp Object System - wtbob
http://www.aiai.ed.ac.uk/~jeff/clos-guide.html

======
zachbeane
Starting from classes and describing generic functions as a way to send
messages is pretty backwards for CLOS.

CLOS is best used primarily by defining a protocol with generic functions,
then using methods and (optionally) classes to implement the protocol.

[http://xach.com/lisp/jrm-clos-guide.html](http://xach.com/lisp/jrm-clos-
guide.html) has a copy of Joe Marshall's "Warp Speed" CLOS guide.

------
sjolsen
For more on CLOS, "Object-Oriented Programming in Common Lisp" is a fun little
book. It has some reasonably practical examples and touches on just enough of
the system's low-level details. It doesn't have much to say on the Metaobject
Protocol, though, and I think for that "The Art of the Metaobject Protocol" is
pretty much _the_ standard text.

~~~
wtbob
Agreed on both recommendations. It's a pity that further standardisation
stalled; the MOP would make a good addition.

~~~
PuercoPop
And that the ideas of 'self-extensibilty' & intersession haven't been further
developed. IIUC one can change a class metaclass in Pharo/Smalltalk but not in
CLOS. Rhodes idea of extensible specializers seems very useful

------
cousin_it
A strongly typed version of CLOS generic functions would look a lot like
Haskell typeclasses, right?

~~~
PuercoPop
IIUC, the primary method of the standard-method-combination look's a lot like
Haskell Typeclasses.

The standard-method-combination has a middleware-like dispatch as shown in
here [0]. CL comes with other method-combinations like +, append and you can
also define new method combinations.

[0]: [https://commons.wikimedia.org/wiki/File:Method-
combination.p...](https://commons.wikimedia.org/wiki/File:Method-
combination.png)

~~~
cousin_it
Ah, I forgot about before/after/around. That makes sense, thanks!

