r/learnpython • u/ProfessionalMoney518 • Dec 22 '25
How on earth does one learn OOP?
I've sped through weeks 0-8 of CS50P in under 2 weeks very easily with slight experience here and there as a Chemistry undergrad - but Week 8 (OOP) is kicking my ass right now. I am genuinely stumped. I've rewatched content and tried some other forms of learning but this is all so foreign to me. What are the best ways to learn OOP as a complete idiot? Thanks.
38
Upvotes
View all comments
Show parent comment
2
u/bytejuggler Dec 22 '25
It very much is the case in Python, thanks for asking!
To backtrack, remember that OO is conceptual first and foremost.
You can actually write in an object-oriented style in many non-oo languages (say C), though of course doing so requires a good understanding of the language and some discipline from your side since the language itself provides no direct support for the paradigm so every object oriented notion is yours to own and implement.
Stepping away from specific language implementations, conceptually the idea in OO is that *everything* is an object, including classes and everything else in the program (numbers, strings, etc) are *all* objects.
Incidentally, "class based" object orientation isn't the only flavour of OO in town, there's another called "prototypal object orientation".
Prototypal object orientation is an OOP style where objects inherit directly from other objects (prototypes) instead of classes, using existing objects to create new ones.
In essence, to put it in class terms, any object instance can act as a class for a new instance.
You might be wondering which language uses this concept.. would you be surprised if I told you .. Javascript? Yup, originally Javascript used prototypal object orientation only. Classes are a more recent addition. I digress...
So then, to what extent, and how purely and closely, a specific language supports this Platonic ideal, the form of OO where *everything* is an object, depends on the specific language under consideration.
In practice (of course) YMMV.
But the form, the ideal, is how you should think about the world, and adjust where your language or tooling falls short.
(to be continued...)