Search code examples
lispcommon-lispclosgeneric-function

Trying to learn: Object Reorientation, and generic functions in LISP!


im reading Practical common Lisp as a result of another question.

I just read chapter 16 and 17 where you can find how LISP manages objects. But after a couple of years of thinking how Java manages objects, i cant really seem to understand how you would implement bigger architectures in LISP using the CLOS.

So i ask you guys for some 20-50 pages reading about CLOS applied to bigger architectures than simple examples. Maybe a couple of blogpost or even experiences!

TY


Solution

  • Perhaps take a look at the example applications that are walked through in the later chapters. You will see that classes and objects are just another tool in your box. Resist the urge to program Java with Lisp syntax.

    Another place to look at is Successful Lisp, chapters 7 and 14 for the basics, and chapters 31 and a part of 3.10 are about packages and handling large projects.

    Some Lisp guru (it might have been Paul Graham, but I am not sure) once said that he has not needed CLOS at all yet.

    edit: I think that your confusion may come from the fact that in Lisp, you do not use the class system for organizing namespaces. This is done separately; the two do not really have anything to do with each other.