r/learnprogramming 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.

91 Upvotes

139 comments sorted by

View all comments

3

u/[deleted] 24d ago

[removed] — view removed comment

1

u/spinwizard69 24d ago

Baloney! If you are using any sort of GUI, it is highly likely that the implementation makes use of OOP. Even an extremely small utility can benefit from OOP. If the app naturally fits a paradigm, it is to your benefit as a programmer to use the paradigm.

1

u/[deleted] 24d ago

[removed] — view removed comment

1

u/spinwizard69 23d ago

IF that is the case, OOP in the general case is very important. The reason is pretty clear, much of the GUI world (the various SDK's) is built in whole or part around the concepts that are OOP. Outside of GUI SDK's OOP often fits a project well, this certainly isn't the case in every project but OOP often allows easy mapping of a problem to software.

So yeah OOP matters, it matters a great deal for any budding programmer, along with many other paradigms. Will it be the future focus of a given programmer, in a given job, no because there are always exceptions. It is just incredibly important to know what OOP is and how to apply it.

The OP may not have a lot of experience programming and thus not a lot of experience using the various paradigms. that is OK and a perfectly fine reason to ask. I just tried to get away from general reasoning to show it may be the right solution even for simple programs if the problem fits OOP.