Hacker News new | ask | show | jobs
by mattmight 44 days ago
Original article author here.

One of the interesting things about the lambda calculus is its universality: by itself, it's a complete foundation for computation.

Here's a different old post of mine showing how to build the rest of the programming language, all in a miniscule subset of Python that is the pure lambda calculus:

https://matt.might.net/articles/python-church-y-combinator/

You can even extract recursion out of the Y combinator or the more primitive U combinator -- out of nothing but lambdas!

So, it's lambdas all the way down.

Another interesting thing about the lambda calculus is that it wasn't intended to be a programming language. When Alonzo Church created it, there were no computers to program.

Alonzo Church was trying to solve problems in the foundations of mathematics.

But, untyped lambda calculus has a "bug" that makes it problematic for mathematics -- the self application that enables recursion is a problem if you're a logician who cares about soundness, but it's fantastic if you're a programmer.

I don't think of functional languages as obfuscating. I think of them as terse and expressive. They let me most directly encode the model in my head as running code.

1 comments

Thanks, I'll dig into that post later!

I think what I don't get is a mental model of what they do, and how that maps onto problems I write code to solve. It's possible it's just that s-expressions are good at solving a problem I don't have and don't really understand.