3 ms·
"OOP actually makes a ton of sense for CRUD and database operations." Not at all OOP is great at simulations, videogames, emergent behaviour in general. If you
by TZubiri 1y ago
"OOP actually makes a ton of sense for CRUD and database operations."
Not at all OOP is great at simulations, videogames, emergent behaviour in general. If you do crud with oop you will complain about overengineering.
- jay_kyburz 1y agoEven in video games, I avoid inheritance, I always much prefer composition. Build a complex object from many small objects, then vary behavior with parameters rather than deriving a child class and overriding methods.
- TZubiri 1y agoRight that's still OOP.
- jay_kyburz 1y agoOh yeah, just saying inheritance is the part I don't like.
- 1718627440 1y agoInheritance and composition is fundamentally the same. This is easy to see when you implement it in a language that has no specific support for either (like C). Inheritance is basically composition of the data and the vtable and then overriding the default vtable entry with the supertype implementation.
- sroerick 1y agoI think that's fair, and I generally prefer a lighter stack for CRUD, but I still love Django and Rails. Maybe just having "objects" is not enough to qualify as OOP but for many use cases, the convenience offered by "Batteries Included" is worth the trade off in "overengineering". If I have to build an app, I'm going for rails. If I'm building a back end, I'm reaching for Go. If I need to integrate with Python libraries, Django is great. But ask me again when I get to the other side of some OCAML projects