2 ms·
OOP is a tool, like FP. Sometimes it make sense, sometimes it doesn't. In my opinion, a good language should allow to do both. Encapsulation and polymorphism ar
by aikah 11y ago
OOP is a tool, like FP. Sometimes it make sense, sometimes it doesn't. In my opinion, a good language should allow to do both. Encapsulation and polymorphism are obviously the most important things in OOP. I think what made some projects hard to maintain is the over reliance on inheritance. If Java had something like mixins or traits , developers would rely less on inheritance to achieve polymorphism. I wish Go had true traits for instance ( struct embedding are not traits ) , it would have made the language close to perfect.