Ian Bicking: the old part of his blog


Another way of thinking about OO is in terms of messages -- at least, that was Alan Kay's preferred metaphor (even though classes then became the norm). Python does very well at this, and if all you think about is messages then Python is more complete than most OO systems. Classes are just one kind of object, and types are one kind of object, but Python's object system is really defined by the set of rules that control getattr (or its syntactic form of ".").

Classic message-based programming paradigms like proxy objects are very simple in Python. In fact, I think they are simpler than in Smalltalk, though they are complicated by the presence of first-class functions/methods. But then, the hackability of methods might be a big plus (or maybe it's too clever and leads to things like Acquisition ;)

Anyway, I don't entirely disagree with the people I quote, but I think that they might not have noticed the namespaces because they were paying too much attention to the hash tables. Dynamic namespaces are the essential component of Python, and of course you'll implement those with hash tables. But you'll never see the namespaces from the implementation alone, they are merely implied.

Really, the justification of Python is also what they use as a criticism: "most Pythonistas seem to actually exploit the translucent nature of objects and classes". This translucent nature causes problems, and it would just suck if it wasn't also very useful. But it is useful, and the intelligent programmer can utilize Python's internal mechanisms to implement many things that would have to be done more explicitly (and with no greater efficiency) in another language.
Comment on Hash table accused of impersonating OO
by Ian Bicking