Moving Past Functions to Cats & Minecraft-style Crafting
multix.substack.comAt 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.
Functions are at best glorified cat containers. I can write a script and never use a function. I can write SQL and never use a function. The Turing tape never mentions "functions" So functions are hardly the bedrock of computing that some claim it is
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?
> I can write a script and never use a function. I can write SQL and never use a function.
I don't think you can, UNLESS we get into semantic arguments of what a function is. SQL is implemented with functions in a different language.
Are you thinking that "function" is anything that literally has the "function" keyword?
> Categories specifically contain "morphisms". Then FP completely gets category theory wrong by trying to claim that functions are immutable.
CT is an abstract mathematical concept. In order to use it, you have to FIND the categories in the real world using the definition. CT isn't something usable on its own unless you are doing high level abstract math and doing proofs etc.
In other words, CT is APPLIED to Computer Science and then we can talk about functions as morphisms. They don't compete with each other, but rather CT is a way to understand the structure of computation. FP is building on top of that (pure FP, Haksell, Idris, etc). If you want to disprove how FP is doing CT incorrectly, that is not going to be easy.
This is a little bananas and I don't really understand it but I'm attracted to the utopian attitude and some of the visualizations it presents. Certainly the next 100 years of programming won't look exactly like the last 100 years of programming. Maybe cats have a place?
EDIT: not impressed by the "demo" of "Multix" that it links to. Seems quite spammy.
Tight budget lol
Is there something else: a repository, an outline of a future specification, ... ?
Um, isn't this basically just describing something like Forth? I don't get what's supposed to be new here.
Cat concepts are a bit language agnostic.
Forth is a tad exotic. Multix lets you use ordinary Typescript/Node