|
|
|
|
|
by proc0
1441 days ago
|
|
At best this is a semantic argument, and giving "function" a different name. > First of all, let’s define a cat as a runnable chunk of statements or instructions That's a function. > Functional Programming (FP) will argue that cats are chains of functions but more accurately they are a chain of function calls (e.g. a bunch of statements - and therefore just one particular type of cat). First of all, there is an isomorphism between programming, Category Theory, and mathematical logic -> https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...
...from which Functional Programming has roots in, with Lambda calculus to languages like Lisp and eventually Haskell. It's a little naive to suggest something better than FP which is somehow better because it's based on CT. Functions exist since Alan Turing and Alonso Church, even though they might have used the word "sub-routine" (arguably they go back to Charles Babbage, and Ada Lovelace in the 1800s). In essence functions are programs. The distinction is semantic and used to denote that functions are the building blocks of programs (because programs can call other programs). A function could be called a program. We could also use routines and sub-routines, but the basic principle is a set of instructions to be executed by a computer. |
|
Categories specifically contain "morphisms". Then FP completely gets category theory wrong by trying to claim that functions are immutable. Which is it?
Instead of chasing strawmen, why not address some of the issues raised in the article directly? Code reuse? Integration? Use of convergence hardware? Interactivity?