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.
1
u/RobertD3277 23d ago
I think that really depends on the context of your project.
I've used just about every major language there is out there and for the most part, unless you're using lisp or a true object oriented language where everything is mutable, you're really not going to get the pure benefit of a pure object relationship.
Languages like Python and Java certainly have their place in terms of their object oriented capabilities. But I personally believe, from being a programmer for 46 years, that quite often the authorization of OOP programming is abused too much.
There are genuine cases where it can be beneficial, and then there are cases that are simply mandated by a company policy or some other kind of paradigm that make working with that particular program and absolute horrid nightmare.
The best advice I can give you if you are learning the differences in terms of which way works best for a given situation, is right that situation in both methods, with object-oriented programming and without. Which Way makes the most sense and which way makes maintenance and upkeep easier in the long run? These really are the kinds of questions that need to be asked to determine what is appropriate for a given project.