Diez B. Roggisch
deets at nospam.web.de
Fri Mar 21 13:48:04 CET 2008
> same. Both languages are dynamically typed. And it seems that using
> "classes" in Python makes some things more complicated then it is
> necessary (eg functions, methods and lambdas are differen beeing in
> Python concept).
Sorry, but that is utter nonsense. It begins with the fact that there is
it's own version of an extend-function ? Which one has to grasp
before really being able to use inheritance in JS. And of course
everybody does it a bit different, including possible access to parent
classes and such. Calling that an advantage is rather bold.
is - e.g. MochiKit offers a bindThis-method to ensure that a method-call
always gets the actual instance passed as this - something that can get
"lost" when dealing with event-handling. Whereas python here offers the
The only point you might have is the somwhat unfortunate distinction
between lambda and function in python - but this is on a syntactical
level only. Once created, you can use them as you like.
I do like JS for what it is - but everybody who uses it in an OO-manner
ends up inventing the same wheels Python already comes with.
 Just one example: http://docs.mootools.net/Class/Class.js
More information about the Python-list