Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 345
DFectuoso Avatar asked Jan 12 '09 22:01

DFectuoso


2 Answers

If you would like to get hold of the book, "Object-Oriented Programming in COMMON LISP" by Sonja E. Keene, Chapter 11 (Developing an Advanced CLOS Program: Streams) contains a non-trivial example with multiple inheritance spanning about 40 pages.

Eight classes are discussed in detail (stream, input-stream, output-stream, bidirectional-stream, character-stream, byte-stream, disk-stream and tape-stream). Concrete classes that a user would be expected to create instances of are then derived using multiple inheritance.

It's more substantial than the bank account example in Practical Common Lisp. You might also find the rest of Keene's book useful in gaining a deeper understanding of CLOS: the whole book is about CLOS.

like image 172
Nelson Avatar answered Sep 18 '22 13:09

Nelson


If you really want to understand CLOS, you can go back and read The Art of the Meta Object Protocol, which provides the basis and the underlying code for Closette, a subset version of CLOS.

like image 21
Technical Bard Avatar answered Sep 19 '22 13:09

Technical Bard