OOP vs FP in Python

preview_player
Показать описание
Object-oriented programming vs. functional programming is one of the greatest internet debates of our time. But the real question is what should we use in Python???

__________________________________________

Check out my other socials!
__________________________________________

#python #softwareengineer
Рекомендации по теме
Комментарии
Автор

I've been programming during my free time for the past 4 years. Spent 3 of them learning how to use OOP, and the last one learning when to not use it. I've found a beautiful balance

knut-olaihelgesen
Автор

I've always manage to avoid OOP by creating dictionaries with sub dictionaries. It always worked for my uses so I never felt the need to learn OOP. I firmly believe that it's possible to solve every problem you have using functions or OOP it just depends on the style of code you want to write. But I will admit that it does get annoying to have to do something like = 15 rather than person_1.set_age(15). I guess it really depends on what you're doing and both approaches are equally valid and awesome in their own way.

Andrey-rcwp
Автор

Hot take: Python is actually procedural and it's okay and Python is good

nekoill
Автор

Tbh python is way better in OOP. I am a huge fan of FP but python is too clumsy in this field

fabricehategekimana