3 ms·
>but I never understood why just using map/filter/reduce and avoiding state is enough for code to be called "functional programming" Maybe that's enough to cou
by delhanty 9y ago
>but I never understood why just using map/filter/reduce and avoiding state is enough for code to be called "functional programming"
Maybe that's enough to count as first-order functional programming ?
The Wikipedia article on Spreadsheet [1] seems to suggest that even a spreadsheet counts as first-order functional program:
>The formula may rely on the value of other cells, but those cells are likewise restricted to user-entered data or formulas. There are no 'side effects' to calculating a formula: the only output is to display the calculated result inside its occupying cell. There is no natural mechanism for permanently modifying the contents of a cell unless the user manually modifies the cell's contents. In the context of programming languages, this yields a limited form of first-order functional programming.[2]
[1] https://en.wikipedia.org/wiki/Spreadsheet https://en.wikipedia.org/wiki/Spreadsheet
[2] https://www.cambridge.org/core/journals/journal-of-functional-programming/article/forms3-a-firstorder-visual-language-to-explore-the-boundaries-of-the-spreadsheet-paradigm/66F1ACF22742EA28DD52608A5122E70F https://www.cambridge.org/core/journals/journal-of-functiona...