0
Do you guys find Object Oriented Programming in Python really useful?
I am still a beginner who started learning the basic concepts of classes, methods, attributes and all that stuff, but I didn't find a reason to use these tools to improve my coding skills.
5 Answers
+ 4
As you progress with Python you will eventually realize that in its core, it is totally object-oriented, I mean everything is an object, even functions, strings, numbers. There is just a lot of "syntactic sugar" that simplifies it on the surface, or at least hides the complexity. But you will definitely need to understand OOP if you want to build programs bigger than a few lines, and if you want to use external or built-in libraries of Python effectively.
It is true that OOP was added to Python as an afterthought, and its implementation is a bit different from the usual compiled languages. But anyway, whatever you learn in Python about OOP, mostly you can transfer that knowledge to other languages too.
+ 1
Ore maybe I did not express my idea clearly.. I meant language design, and not the programming style using the language. Of course you can also write Javascript code in imperative, declarative, functional, or object-oriented style. And curiously at the language design level, Python seems to be even more object-oriented than Java, because Java has primitive data types (int, char, etc) that are not objects.
+ 1
Thanks everyone for opening my eyes. I am still a beginner, Python is the only programming language I know, so I will try to implement these OOP concepts in my codes. Hopefully I will be able to implement these skills on my codes. Thanks everyone!
0
Tibor Santa Python is not the only language where everything is an object. JavaScript is another of such languages. Is JavaScript also totally object-oriented?