For people who are interested. The theoretical foundations for this is lambda-calculus created by Alonso Church. Encoding integers with lambda is called the curch encoding: http://en.wikipedia.org/wiki/Church_numerals Functional programming in general is built upon the foundations laid out by him. Actually the domainname of hackernews (ycombinator) has a lot todo with lambda calculus.
List out of Lambda
11–20 of 49 posts
Re: List out of Lambda
#12Re: List out of Lambda
#13For people who are interested. The theoretical foundations for this is lambda-calculus created by Alonso Church. Encoding integers with lambda is called the curch encoding: http://en.wikipedia.org/wiki/Church_numerals Functional programming in general is built upon the foundations laid out by him. Actually the domainname of hackernews (ycombinator) has a lot todo with lambda calculus.
All you need is S and K - all the rest is syntactic sugar, even Y. :-)
Re: List out of Lambda
#14Earlier quoted context omitted.
> Turing-completeness, of course. Lots of useful programs can be written without turing completeness. It can be useful, but only for a limited problem domain.
"Lots of useful programs can be written without turing completeness." Including Bitcoin transactions - I learned this from elsewhere on HN today. FYI: https://en.bitcoin.it/wiki/Script
Re: List out of Lambda
#15Earlier quoted context omitted.
> Turing-completeness, of course. Lots of useful programs can be written without turing completeness. It can be useful, but only for a limited problem domain.
It actually can have some benefits -- a language without any unbounded loops or recursion isn't Turing-complete, but you do get a static guarantee of termination. NASA, for example, writes much of their C code only with bounded recursion. So they can't compute some things, but they can be sure that the Mars lander never gets stuck in an infinite loop.
Re: List out of Lambda
#16 "If you ignore the practical issues of computers like size, weight, cost, heat,
and so on, what do you really need in a programming language?"
One instructionRe: List out of Lambda
#17Earlier quoted context omitted.
"Lots of useful programs can be written without turing completeness." Including Bitcoin transactions - I learned this from elsewhere on HN today. FYI: https://en.bitcoin.it/wiki/Script
Fascinating. What is this?
Re: List out of Lambda
#18Ugh. It's nice that Steve is reaching down to his audience, but it would be nice for the audience to step out of their muddy sandbox once in a while.
Re: List out of Lambda
#19For people who are interested. The theoretical foundations for this is lambda-calculus created by Alonso Church. Encoding integers with lambda is called the curch encoding: http://en.wikipedia.org/wiki/Church_numerals Functional programming in general is built upon the foundations laid out by him. Actually the domainname of hackernews (ycombinator) has a lot todo with lambda calculus.
Re: List out of Lambda
#20I get that JavaScript is a popular language, but burying a fundamental concept under a cluttered and confusing syntax like JavaScript, when it's much cleaner to explain the math using sensibly notation. Ugh. It's nice that Steve is reaching down to his audience, but it would be nice for the audience to step out of their muddy sandbox once in a while.
function(x) {return function(f) {return f(x);};}
can be considered easier to comprehend than λx. λf. f x