4 ms·
Many years ago I wrote a simple programming language that would macro expand into lambda calculus statement that could then be compiled down to different sets o
by arethuza 3y ago
Many years ago I wrote a simple programming language that would macro expand into lambda calculus statement that could then be compiled down to different sets of combinators - the simplest being just S & K, which are pretty fundamental given how simple they are. The fact that you can express things like recursion in the lambda calculate (see name of our hosts on this site) and therefore in combinators still amazes me.
Not the most efficient approach but it does work.
https://en.wikipedia.org/wiki/SKI_combinator_calculus https://en.wikipedia.org/wiki/SKI_combinator_calculus
- tromp 3y ago> expand into lambda calculus statement that could then be compiled down to different sets of combinators This approach can be reasonably efficient for implementing Haskell, as shown in [1] and the much more concise [2]. [1] https://github.com/augustss/MicroHs https://github.com/augustss/MicroHs [2] https://crypto.stanford.edu/~blynn/compiler/ https://crypto.stanford.edu/~blynn/compiler/