2 ms·
> I disagree here. In OOP the core concept is the object (whether mutable or not) You've missed OP's deeper point: even if immutable, the duality of object ide
by eternalban 10y ago
> I disagree here. In OOP the core concept is the object (whether mutable or not)
You've missed OP's deeper point: even if immutable, the duality of object identity & object state remains. (Immutability is not the central issue. The issue is that in FP you can use the term "data" without blushing, where as in OOP "state" is masquerading as "data".)
- kaoD 10y agoNo I didn't miss it, I just don't think that duality is inherent to OOP and is pretty much a byproduct of OOP languages being imperative, mutable and referential, which makes OP conflate all those properties. What do you think prevents OOP languages from implementing automagical non-referential equality by data traversal by default like FP languages do? Is it some property of OOP itself? IMHO it's not a property of the paradigm. The duality is still present in FP languages, it's just hidden under a nice automagical layer. (= (cons :a (cons :b '())) (cons :a (cons :b '()))) => true Both lists are still separate memory regions. They're the same data only in a platonic way and there's nothing that prevents OOP from implementing the exact same abstraction.