Common Lisp Object System (CLOS)
hescaide.me
Common Lisp Object System (CLOS)
1–10 of 90 posts
Re: Common Lisp Object System (CLOS)
#2> OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them.
[http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay...]
His reference to ‘LISP’ is, of course, referring to CLOS.
Re: Common Lisp Object System (CLOS)
#3Re: Common Lisp Object System (CLOS)
#4This makes me think he's barely scratched the surface of what CLOS has to offer.
Re: Common Lisp Object System (CLOS)
#5> I don’t know the exact implementation details of CLOS, but I feel that it can be easily replicated in C This makes me think he's barely scratched the surface of what CLOS has to offer.
[1] https://mitpress.mit.edu/9780262610742/the-art-of-the-metaob...
Re: Common Lisp Object System (CLOS)
#6Alan Kay’s immortal quote about OOP: > OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I'm not aware of them. [ http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay... ] His reference to ‘LISP’ is, of course, referring to C…
Re: Common Lisp Object System (CLOS)
#7Yes I'm aware of the things you get in CL you don't get in Java: multiple inheritance, defmethod works on arbitrary types by default rather than having to create interfaces, better introspection.. but I don't care. If you're using these features so much there's probably something overly complex with your code to need to do so. Or you're working in such a complex domain you need to, in which case go ahead..
Re: Common Lisp Object System (CLOS)
#8The definitive book on implementing CLOS (not how to use it) is https://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Prot...
Re: Common Lisp Object System (CLOS)
#9Anyways Python's "class" is even worse:
class c: a=10
print c.a
c.a=13
print c.a
I cannot think any English word to replace the "class". The word I am thinking of could be translated as "box". "Box of things and improved versions of it".Re: Common Lisp Object System (CLOS)
#10Meh.. I code in Common Lisp at home and Java professionally and I've never understood why people praise the CLOS so much. Like the author says, 99% of the time you don't have a reason to use OOP, and the few times you do you'd prefer to use as little as possible to keep everything sane. It's also one of the few parts of CL which are not optimized well by default, using structs or other basic data structures instead o…
CLOS itself is great, however the decoupling of data and methods is something at times I find leads to harder to understand code.