4 ms·
I wondered whether there was a conscious link in the minds of early language designers to Church encoding of booleans. (well, other than McCarthy and Lisp) A C
by fanf2 6y ago
I wondered whether there was a conscious link in the minds of early language designers to Church encoding of booleans. (well, other than McCarthy and Lisp)
A Church boolean is either:
true = λt.λf.t
false = λt.λf.f
So instead of writing an expression with keywords like
if bool then yep else nope
Just use the boolean as a function and apply it to the then and else clauses like
bool yep nope
So the shape is very similar to modern languages, but with less syntactic scaffolding.