9 ms·
In the Smalltalk section, it says that Python isn't 'true' OO like Smalltalk... who considers this to be the case? In Python, everything (including functions, a
by askvictor 1y ago
In the Smalltalk section, it says that Python isn't 'true' OO like Smalltalk... who considers this to be the case? In Python, everything (including functions, and classes), is an object
- a_bonobo 1y agoI think this refers to encapsulation in Python, 'private' methods aren't really private, any user can poke around in there. Old justification: https://mail.python.org/pipermail/tutor/2003-October/025932.html https://mail.python.org/pipermail/tutor/2003-October/025932.... >Nothing is really private in python. No class or class instance can keep you away from all what's inside (this makes introspection possible and powerful). Python trusts you. It says "hey, if you want to go poking around in dark places, I'm gonna trust that you've got a good reason and you're not making trouble." >After all, we're all consenting adults here.
- johannes1234321 1y agoI don't think that is the relevant point. Smalltalk doesn't have visibility either. The difference is that in smalltalk everything is a message. Operators are messages to an object. Even things we commonly assume to be control structures in other languages like if or while (or rather ifTrue, whileTrue) are messages. Python is a lot less "pure" but so are all commonly used OO languages.
- brodo 1y agoI think this comes from the fact, that Alan Kay does not think it is OO. There is no legal definition, but Python does other have Smalltalk-like 'method_missing' or 'responds_to' methods. If you think OOP means messages and late-binding, that feature is important.
- igouy 1y agoThat's the opposite of what it says — We sometimes think that Smalltalk is “true” OOP and things like Java and Python aren’t “real” OOP, but that’s not true.