POO 🤕 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

POO 🤕

Hello everybody, can someone simply explain to me OOP ? I read, reread, etc ... but I definitively don't finely catch the concept and useness of it. If someone has a concrete exemple, it will be welcome. Thank you very much

5th Jan 2020, 1:01 PM
Fabien
Fabien - avatar
2 Answers
+ 7
If you write purely with functions and data, your code can become harder to maintain as your program becomes bigger. You have a phalanx of functions and an avalanche of variables, containers etc., and basically every function could mess with any data. OOP allows you to assemble data in one spot and protect it from the rest of the code; then only the functions that need to interact with this data are added, and they also can control, how the data is communicated with the rest when necessary.
5th Jan 2020, 1:09 PM
HonFu
HonFu - avatar