Trying to find out: reorienting objects and common functions in LISP!

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

I just read chapters 16 and 17 where you can find how Lisp manipulates objects. But after a couple of years when Java is managing objects, I don't seem to really understand how to implement larger architectures in Lisp using CLOS.

So, I ask you guys for 20-50 pages reading about CLOS applicable to larger architectures than simple examples. Maybe a couple of blog posts or even an experience!

Ty

+6
lisp common-lisp clos
source share
5 answers

Perhaps take a look at the sample applications that will be covered in subsequent chapters. You will see that classes and objects are another tool in your box. Resist the urge to program Java with Lisp syntax.

Another place to look is Successful Lisp , chapters 7 and 14 for the basics, as well as chapters 31 and part 3.10 on packages and handling large projects.

Some Lisp guru (maybe it was Paul Graham, but I'm not sure) once said that he did not yet need CLOS.

edit: I think your confusion may arise because in Lisp you are not using a class system to organize namespaces. This is done separately; these two really have nothing to do with each other.

+4
source share

If you want to get a book, “Object-Oriented Programming in COMMON LISP,” Sonia E. Keen, Chapter 11 (“Developing an Advanced CLOS Program: Streams”), contains a non-trivial example with multiple inheritance of about 40 pages.

Eight classes are considered in detail (stream, input stream, output stream, bidirectional stream, character stream, byte stream, disk stream, and tape stream). The specific classes that the user will have to instantiate are then produced using multiple inheritance.

This is more substantial than an example of a bank account in Practical Common Lisp. You can also find the rest of Keene’s book, useful for a deeper understanding of CLOS: the entire CLOS book.

+7
source share

If you really want to understand CLOS, you can go back and read The Art of the Metaobject Protocol , which provides the foundation and core code for Closette, a subset of CLOS.

+5
source share

We at Weblocks also use CLOS heavily, so you may need to look at the source a bit.

+2
source share

Large CLOS applications 1) CAPI from Lispworks 2) web server cl-http 3) very large CLOS package CLIM 4) if you like OpenGenera (that Lisp OS using Common Lisp and some predecessors ZetaLisp 5) smaller package http: / /www.cliki.net/mel-base

Relations Friedrich

0
source share

All Articles