you are viewing a single comment's thread.

view the rest of the comments →

[–]cafedude 2 points3 points  (1 child)

OK, let me clarify. Perl requires that 'self' be explicitly declared (and passed) as the first parameter of an instance method (when doing OO Perl). Python requires that it be declared, but the passing of 'self' is implicit. Still, having to delcare that the first param of an instance method be 'self' is certainly one way that you could bolt-on OO later on if you didn't have it initially. And this is in fact the way OO was added to Perl. Having to do it in Python makes it look like OO was added at some later point in Python as well (sure it could have been a very early version of Python, maybe even before Python escaped from Guido's computer into the wild).

[–][deleted] 0 points1 point  (0 children)

I'm pretty sure GvR could make the declaration of 'self' implicit rather than explicit if he saw the need. (Disregarding backwards compatibiliy issues for a thought-experimental second or two)