| ▲ | the__alchemist 6 hours ago | ||||||||||||||||
I think this is some combination of strawman, and subset of all cases. You can lament complications of OOP. You can also lament the complications of docker, kubernetes, HTTP APIs etc. These aren't mutually exclusive, and they don't span the breadth of programming techniques. I prefer avoiding all of these. Anecdotally, I've replaced OOP with plain data structures and functions. | |||||||||||||||||
| ▲ | mickduprez 6 hours ago | parent | next [-] | ||||||||||||||||
>> _Anecdotally, I've replaced OOP with plain data structures and functions._ I think this is why FP is becoming more popular these days but I'm not sure some people get why. The problem with OOP is you take a data set and spread it all over a 'system' of stateful (mutable) objects and wonder why it doesn't/can't all fit back into place when you need it to. OOP looks great on paper and I love the premise but... With FP you take a data set and pass it through a pipeline of functions that give back the same dataset or you take a part of that data out, work on it and put it straight back. All your state lives in one place, mutable changes are performed at the edges, not internally somewhere in a mass of 'instances'. I think micro services et al try to alleviate this by spreading the OO system's instances into silos but that just moves the problems elsewhere. | |||||||||||||||||
| |||||||||||||||||
| ▲ | 4 hours ago | parent | prev | next [-] | ||||||||||||||||
| [deleted] | |||||||||||||||||
| ▲ | bluGill 5 hours ago | parent | prev | next [-] | ||||||||||||||||
It is somewhat interesting to realize micro services are conceptually solving the same problem that OOP despite working in such different areas. Though OOP is just one step - structured programming works on the same problem. | |||||||||||||||||
| ▲ | phkahler 5 hours ago | parent | prev [-] | ||||||||||||||||
>> Anecdotally, I've replaced OOP with plain data structures and functions. Agreed. I think objects/classes (C++) should be for software subsystems and not so much for user data. Programs manipulate data, not the other way around - polymorphism and overloading can be bad for performance. | |||||||||||||||||
| |||||||||||||||||