Hacker News new | ask | show | jobs
by wk_end 1000 days ago
The Haskell community was, quite clearly, heavily influenced by category theory. Monads (as a programming tool) fell out of that, and I suspect this directly influenced the treatment of async in Javascript (and elsewhere).

I do think "extremely influential" is overstating it. Outside of that, plus some niches of niches of academic CS, I can't really think of any other places where category theory is particularly important.

1 comments

I am not sure that it influenced async in javascript. But the earliest monad paper I found in ~2 minutes of googling [0] even uses natural transformations which in my opinion counts as using CT.

[0] Eugenio Moggi Computational lambda-calculus and monads (1989) https://www.cs.cmu.edu/~crary/819-f09/Moggi89.pdf

Async/await comes originally from F#, brainchild of the Cambridge MSR lab that also maintain(s|ed) GHC. Async/await is just a limited monad syntax, and its originators were well aware of that fact. Insofar as monads are a categorical vocabulary for effects, then, async/await in JavaScript and all the other languages that now implement it all ultimately stem from category theory :)

More vaguely but also more sweepingly I think the general approach, now the standard in language design, of taking a pure language as base and then adding effects to it is established thanks to Moggi's work on monadic effects, which makes essentially all modern programming languages heavily influenced by CT (at a couple of steps' removal).