3 ms·
Kinda the other way around honestly. FP predates OO by decades. If you think of "traditional OOP" as C-style syntax, then you could conceivably think of C-style
by dharmaturtle 5y ago
Kinda the other way around honestly. FP predates OO by decades. If you think of "traditional OOP" as C-style syntax, then you could conceivably think of C-style syntax as an attempt to make FP more readable.
Personally, I prefer FP-style (ML in particular) syntax. I think the fact that OOP languages are copying ML features like pattern matching, preference for immutability/call-by-value, and "do-notation" as a testament to FP's power.
Side note about syntax, honestly it's just glue. `<$>`, `|>`, `<*>`, and all the other symbols are just boring operations that are used so often that it's preferable to use symbols so programmers can focus on the meat. In other words:
functionA <$> functionB |> functionC <*> functionD
is easier to read than
functionA(map(functionB(pipe(functionC(bind(functionD))))))