When To Use CLOS

Jean-Philippe Paradis retweeted a link

to this classic Erik Naggum post on CLOS and object-oriented programming in Lisp. Every time I read it I learn something new and understand CLOS just a little bit better. If you're a Lisper and haven't read it yet do so right now.

Naggum, in his inimitable way, explains why the message passing approach to O-O—and therefore most common languages claiming to be object-oriented—is fundamentally broken. He says, in fact, that trying to implement object-orientation in a statically typed language is theoretically unsound.

That's a bit polemical, of course, but whether you agree or not, his discussion of Common Lisp's approach to object-orientation is useful and enlightening. If you've been confused by the claimed superiority of CL's approach of emphasizing generic functions instead of classes, give this post a read; Naggum explains it well.

If you're completely new to CLOS and generic functions, you should read Joe Marshall's excellent Warp Speed Introduction to CLOS (link fetches the page) before looking at Naggum's post. Even if you're not interested in Naggum's post, you should read Marshall's article. It's the best no-nonsense introduction to CLOS I've seen.

Update: Parradis → Paradis

This entry was posted in Programming and tagged , . Bookmark the permalink.
  • http://www.hexstreamsoft.com/ Jean-Philippe Paradis

    Thanks very much for the mention, as always, but it's "Paradis" with one "r".

    • http://irreal.org jcs

      Yup. Sorry. Oddly enough I usually have a problem with Philippe. I always want to put in two l's and one p. I was so happy that I got that right without looking that didn't check Paradis although I've never had a problem with it before. As my Mom always said, "Of all the things I've lost, I miss my mind the most."

      I'll try to do better.

      • http://www.hexstreamsoft.com/ Jean-Philippe Paradis

        Thanks for the fix!