3 ms·
I like Michael Feather's quote https://twitter.com/mfeathers/status/29581296216 https://twitter.com/mfeathers/status/29581296216 OO makes code understandable b
by jbandela1 10y ago
I like Michael Feather's quote https://twitter.com/mfeathers/status/29581296216 https://twitter.com/mfeathers/status/29581296216
OO makes code understandable by encapsulating moving parts. FP makes code understandable by minimizing moving parts.
I think they can be used in a complementary manner. One area where functional thinking can be a benefit can be in code that is tested with a lot of mocks. Instead of having a bunch of objects that mutate state and that need to be mocked out, model that part of the program as a series of pure function transformations of data. It will be much easier to test and reason about.
- honua 10y agoTiny request -- can you indicate that the line following the link is a quote? I wasn't sure if that was from the 'tweet' or if that was your interpretation/summary of it