3 ms·
I do not dispute the author's thesis that OO and FP can be combined synergistically, but I don't find the specific arguments convincing. In the author's charac
by mannykannot 9y ago
I do not dispute the author's thesis that OO and FP can be combined synergistically, but I don't find the specific arguments convincing.
In the author's characterization of OO, it seems strange that a bit of syntactic sugar would make a profound difference to the semantics of programs, and on closer inspection, it doesn't.
The author claims that with f(o), the caller has a dependency on the callee that does not exist in the OO version o.f(), but of course, in either case, the caller has a dependency on the callee doing the same right thing. There are multiple approaches to assigning some sort of confidence to the proposition that the program design satisfies this dependency, and an unending debate over which is best, but none of them depend on the syntax of the call. It doesn't even imply a specific implementation style, as there are several languages, some OO and some not, in which f(o) might be implemented as different functions for different types.
Pattern matching in fp is widely regarded as a feature.