3 ms·
Please see https://twitter.com/dpc_pw/status/1240719977071575040 https://twitter.com/dpc_pw/status/1240719977071575040 for description how OOP + ORM business co
by dpc_pw 6y ago
Please see https://twitter.com/dpc_pw/status/1240719977071575040 https://twitter.com/dpc_pw/status/1240719977071575040 for description how OOP + ORM business code falls apart in practice, then https://dpc.pw/opportunistic-programming https://dpc.pw/opportunistic-programming for what I encourage. Then more posts there if you're still interested.
- losteric 6y agoThe first isn't really a critique of OOP. It's a critique of ORMs that doesn't recognize ORMs are not OOP despite the name - they initialize state that languages refer to as "objects", but those do not offer true abstractions. The second link is good, but it's just describing OOP done right. If you read the original publications, way back, OOP was never about idiomatically programming in Things - the typical example of "Dog extends Animal" is antithetical. Objects should be closer to microservices. Within those objects... stateless transforms and simple state containers (like structs), or some spaghetti. Didn't matter, the other objects should never interact below the interface.