3 ms·
The main lesson I’ve drawn is that the real problem is dogma: OOP works fine if you aren’t trying to follow some One True Way™ rather than adjusting based on yo
by acdha 7y ago
The main lesson I’ve drawn is that the real problem is dogma: OOP works fine if you aren’t trying to follow some One True Way™ rather than adjusting based on your needs, problem domain, and resources. The same is true of most other styles: FP is prone to getting a certain brand of immutability fanatic who will cause problems until they learn more about computer architecture and get a more nuanced position.
In every case, focusing on dogma avoidance and having reasonable technical debt levels seems to be far more important than the specific language and paradigm.
- smabie 7y agoPeople think that with FP you end up just copying a bunch of stuff constantly. But in my experience, that's rarely true: structural sharing minimizes copying so that the performance is usually on par with in place mutation. In fact, in some situations, the immutability guarantees make the program faster than the mutable version. Moreover, advanced compilers (like GHC and the OCaml compiler), can often turn functional code that allocates and copies into in-place, GC-free code.
- acdha 7y agoRemember, I was talking about dogmatic silliness - the kind of thing where someone thinks it’s some kind of moral failing to use Haskell’s mutable structures, even though they’re there for a reason. My point was that this seems like the same mindset even in two fairly different domains, and that we’re prone to talking about it as a technical problem when it’s really more of social one.