3 ms·
Functional and OOP the way you seem to be thinking about them aren't necessarily at odds. If you don't immutably update objects and instead do 'return-the-updat
by nikki93 11y ago
Functional and OOP the way you seem to be thinking about them aren't necessarily at odds. If you don't immutably update objects and instead do 'return-the-updated-object' then it could fit in with functional. They seem to do this often in Haskell libraries for example. The weird thing is the notion of identity across OOP and Functional--you can have shared handles to an underlying object modified by separate code in traditional OOP.
Mixing paradigms is interesting. My favorite is to not do class-based object oriented, but prototype-based instead, with multiple parents like in Self. I wonder how that would combine with immutable objects.