r/ProgrammingLanguages • u/FurCollarCriminal • May 21 '24
Why do we love the lambda calculus?
I've been reading about some of the more esoteric models of computation lately, and it got me wondering why it is that the lambda calculus is the "default". So much literature has been built up around it now that it's hard to imagine anything different.
Is it merely the fact that the lambda calculus was the 'first to market'? Or does it have properties that make it obviously preferable to other models of computation such as combinators, interaction nets, kahn process networks, etc?
77
Upvotes
View all comments
Show parent comment
2
u/poorlilwitchgirl May 21 '24 edited May 21 '24
In my opinion, the combinator calculus is the one best suited for abstraction, which is necessary for a minimal language to be understandable and useful (pick your minimal basis, there's an infinity of them beyond SKI but they're all equally good for building abstractions). Turing machines are awful at abstraction, and lambda calculus is better, but doing serious programming in it, while possible (using the Y combinator and the like) gets painful fast. Combinator calculus is great because it's fundamentally based on objects which are intended to be combined in reliable ways, so it's designed from the ground up to make abstraction easy; not coincidentally, it's (afaik) the only one of the major universal computation models that is actually used in a mostly vanilla form to write serious software.
I think the reason pure combinator calculus is less popular than lambda calculus comes down to lexical variables. While there are plenty of people enthusiastic about concatenative languages (including myself), almost universally everybody else agrees that they suck to read and write. Lexical variables seem to be innately natural to most programmers, so the lambda calculus model feels right, even when it needs to be heavily augmented to do anything useful in.