merits of Lisp vs Python

Jan Dries jan.dries at dcube-resource.be
Mon Dec 11 22:53:46 EST 2006


Robert Brown wrote:
> Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:
>> Espen Vestre <espen at vestre.net> writes:
>>>> Can you redefine CLOS methods without calling CLOS functions that tell
>>>> the object system what to expect (so it can do things like update the
>>>> MRO cache)?  I.e. can you redefine them by poking some random
>>>> dictionary?  You can in Python.  I don't claim that's a good thing.
>>> Just as I said: Less managable, but not more dynamic.
>> I'm not getting through to you.  Yes, you could create a Python-like
>> object system in Lisp that's separate from CLOS, but nobody would use
>> it ....
> 
> I think you are not understanding the point that Espen is trying to make.
> He is not suggesting a different object system for Lisp.
> 
> Espen is saying that Common Lisp often offers the same dynamic feature as
> Python has, such as the ability to redefining a method at runtime.  Lisp,
> however, forces you to call a CLOS function or use an well defined interface
> when redefining a method.  You can't just change a value in a hash table.
> Does this make Lisp "less dynamic" than Python?  Espen would say it's not
> less dynamic, but rather that a similar level of dynamism is achieved in
> Common Lisp via well defined interfaces.  The compiler knows the interfaces,
> so it can do a better job optimizing the code.

Isn't that the same as saying "less dynamic" by the very meaning of the 
word in this context? The more the compiler knows or can deduce at 
compile time, the more static. At least that has always been my view on it.

Regards,
Jan




More information about the Python-list mailing list