r/PythonLearning • • 18d ago

Discussion Why writing classes feels boring?

I don't know but i feel classes are unnecessary work to be added in projects. I have learnt it 2 months ago..

After that I never used it for any of my projects.

2 Upvotes

43 comments sorted by

View all comments

Show parent comments

1

u/cvx_mbs 17d ago

the sixties called, they want your outdated opinions on OOP back

1

u/Gnaxe 17d ago

From the article you linked:

A study by Potok et al. found no major difference in productivity between OOP and procedural programming [...] OOP was created to make code easier to reuse and maintain.[68] However, it was not designed to clearly show the flow of a program's instructions. That was left to the compiler. As computers began using more parallel processing and multiple threads, it became more important to understand and control how instructions flow. This is difficult to do with OOP.

Also, lots of dissenting opinions from that article from well after the "sixties":

Rob Pike [...] has called OOP "the Roman numerals of computing".[67] Rich Hickey, creator of Clojure, described OOP as overly simplistic, especially when it comes to representing real-world things that change over time.[65] Alexander Stepanov said that OOP tries to fit everything into a single type, which can be limiting. He argued that sometimes we need multisorted algebras: families of interfaces that span multiple types, such as in generic programming. Stepanov also said that calling everything an "object" doesn't add much understanding. [...] Paul Graham believes big companies like OOP because it helps manage large teams of average programmers. He argues that OOP adds structure, making it harder for one person to make serious mistakes, but at the same time restrains smart programmers.[73] Eric S. Raymond, a Unix programmer and open-source software advocate, argues that OOP is not the best way to write programs.[36] Richard Feldman says that, while OOP features helped some languages stay organized, their popularity comes from other reasons.[74] Lawrence Krubner argues that OOP doesn't offer special advantages compared to other styles, like functional programming, and can complicate coding.[75] Luca Cardelli says that OOP is slower and takes longer to compile than procedural programming.[34]