- 1

What is the necessity of object oriented programming in python if everything is possible with other functions?

It is as if complexing the program

29th Jun 2021, 4:34 PM
Zahed Shaikh
Zahed Shaikh - avatar
2 odpowiedzi
+ 4
Classes are not needed everywhere. The trick of OOP is that a person already thinks in classes! Raise our head to the sky and see "The bird is flying", in other words "The" Fly "method was called on the" Bird "object", but we don't think so hard and for us it's just "Flying bird". Developers often choose to use OOP in their Python programs because it makes code more reusable and makes it easier to work with larger programs. https://www.educative.io/blog/how-to-use-oop-in-python#:~:text=OOP%20in%20Python,-Python%20is%20a&text=Developers%20often%20choose%20to%20use,once%20and%20reused%20many%20times. 
29th Jun 2021, 4:51 PM
SammE
SammE - avatar
+ 1
there is no necessity to use OOP in python, even if under the hood it mostly use it... OOP is only a programming paradigm, and you could achieve same goals with other paradigms (functional...) ^^ however, Python is mainly OOP by design, and some tasks are easier to be handled with OOP, even if that could seems "complex" at first ;) that's why it's a paradigm wich have becomed so popular ;P hold tight, and you would discover progressively the powerfulness of OOP... or stick to functional programing or or anyelse: that's up to you to choose... but anyway, some languages are much best suited for specific paradigm ;P https://en.m.wikipedia.org/wiki/Programming_paradigm
29th Jun 2021, 8:36 PM
visph
visph - avatar