Hacker News new | ask | show | jobs
by jasim 2498 days ago
If I understood you right, Lisp was not directly inspired by lambda calculus, but from McCarthy's own research into recursive functions where he found that the three primary functions can cover the whole of computation.

What I'm extrapolating from this is that McCarthy's ideas are similar in implication to Lambda Calculus where you can define computation with just function abstraction and application, and use Peano numbers to represent data. Both approaches end up creating a purely functional way to write programs.

Would that be correct? I also wonder whether there is anything we can take away from this knowledge that is applicable to programming or how we look at it?

1 comments

What "three primary functions" are you referring to?
I suggest you to watch this video if you want to understand how 3 basic functions can be used to create whole language https://youtu.be/3VQ382QG-y4
This is touched on in the article:

"They are interesting because with just three initial functions (successor, constant and projection functions) closed under composition and primitive recursion, one can produce most computable functions studied in number theory (addition, division, factorial, exponential, etc.)."

Probably means the 3 irreducable primitives in LC: applications, abstractions, and "variables" (ie. attribute identifiers)
In this context, it’s more likely the 3 basic primitive recursive functions: constant, successor, projection. https://en.wikipedia.org/wiki/Primitive_recursive_function#D...
Those functions compose into programs that halt (if I read the linked Wiki right). The LC encompasses those programs plus more programs, which cannot be shown to halt.