Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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




I 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....

>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.


I 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.


I 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.

That'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.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: