Asking what is your opinion about clos.

Discussion of Common Lisp
Post Reply
ylando1
Posts: 3
Joined: Sat Jul 03, 2010 1:22 am

Asking what is your opinion about clos.

Post by ylando1 » Sat Jul 03, 2010 1:37 am

Hello.

I am curios about common lisp object system.
What is your opinion about it?
I prefer an answer from lisp professional programmers.
If you never use lisp for any real application, please don't answer this question.
Do you like it?
Is it fast enough for real application?
Do you use it in a real application?

Thanks in advance for your answers.

ylando1
Posts: 3
Joined: Sat Jul 03, 2010 1:22 am

Re: Asking what is your opinion about clos.

Post by ylando1 » Mon Jul 12, 2010 1:44 pm

No one use lisp, for real project on this forum?

gugamilare
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil
Contact:

Re: Asking what is your opinion about clos.

Post by gugamilare » Mon Jul 12, 2010 2:47 pm

It depends on what you consider a "real application" and "professional programmer". Probably most of Lisp programmers in this forum are young programmers who have only toy projects and small libraries. It is difficult to find companies using Lisp. I am about to get into a more "real" project involving math modeling, but the project is still crawling (even in the concept itself) so I can't tell you much. If you want Lisp professionals, try comp.lang.lisp.

I can tell you CLOS (the Common Lisp Object System) and Common Lisp in general is fast. It is unfortunately slower than static object systems like C++ and Java due to its dynamic nature, but, in speed-critical parts of your code, you will probably avoid using object systems anyway. In those parts you can use Lisp's optimization techniques (by almost transforming it into a static-typed language) and achieve good performance.

The most important, though, is not the performance you are going to get, but the flexibility you have with Lisp without sacrificing speed when you need it.

calibraxis
Posts: 6
Joined: Mon Jul 05, 2010 12:22 am

Re: Asking what is your opinion about clos.

Post by calibraxis » Mon Jul 12, 2010 5:57 pm

I've used Lisp commercially. It just seemed this question is very broad and needed a foundational answer.

It's simple to be fast enough for real applications. I hear Ruby is slow, but it's certainly used in real applications. CLOS was at least designed with performance in mind. If you profile your code or do an upfront test, and find that defmethod is somehow the bottleneck, then you can shift down to structs and defun, or loops or something. Or mess with the metaobject protocol.

I used it all the time. 'Before' and 'after' methods are useful.

There's plusses and minuses. Dynamically adding slots could've been built in for convenience. Clojure's approach to OOP, to use the term loosely, is also powerful (there's many good videos). Even before I heard of Clojure, easy immutability seemed obviously useful.

Post Reply