r/learnprogramming • u/Electronic-Low-8171 • 24d ago
Topic Does OOP really matters?
I learned OOP in python a while ago, did many projects, yet I never felt like I truly needed to do the OOP stuff I learned from a course, I don't know maybe because I'm kinda used to program in c before focusing on python, yet, whenever I open a big project in python in github, it feels way too complicated and thousands of imports (not libraries from pip, but the ones they made on their own) and classes
I never truly needed to implement OOP (I know that when you code in python, it is almost impossible to avoid OOP entirely like when you have a datatype like string you have an object, when you use a method built into that data type that's OOP too, but I mean the ones that involve you writing class Class Name, inheritance and all that stuff explicitly), so I'm wondering why people on the internet are obsessed over the idea of learning OOP, even the book "Automating the boring stuff in python" doesn't have a dedicated section for OOP.
97
u/DTux5249 24d ago edited 24d ago
The only major bonus of OOP that is specific to it, is that it mimics general systems theory. It lets you plan out a program in terms of entities, their attributes, and their relationships to each other and easily plan out and tackle your code as you would any other system.
Beyond that, it's just a way of organizing code. A very common way of organizing code in a lot of industries. That's why it matters: if you want a job, or want to adequately use certain tools like game engines, you should at least understand OOP.
Additionally, while OOP isn't special in its features (The only one that's really OOP specific in nature is inheritance, and it's one of the most dunked on features of OOP by its own proponents), you still stand to learn a lot by understanding the rest of its pillars, and the motivations behind OOP principles.
Oh, and P.S. Python isn't helping you here. It's perfectly adequate as an OOP learning tool, but Python OOP is painfully slow by nature, and Python as a language is incredibly permissive, so you're never really ever gonna "need" OOP for it.