Yeah, the macro-based lambda calculus is pretty slow, since it's essentially an interpreter upon interpreter upon interpreter! The first one is preprocessor, which executes Metalang99, which executes the final calculus.
If this is example, I am not sure I want to learn. Lisp whilst is a high learning curve at least it is not verbose by nature (many writing is but not the language).
This is truly quite insane. I'd like to note that there seems to be much more to it than the one file linked here, it references other macros defined in other files.
Also, the author says that you can use this "to drastically improve quality of your code -- make it safer, cleaner, and more maintainable."
I hope this is somewhat sarcastic, because I doubt just about anyone else would like to find your code using this.
I learnt it from "Type Theory and Formal Proof" when I wanted to understand type theory (I was in a community of functional programmers). BTW, nice book, I always recommend it to absolute beginners.
Compiling this file (cd examples; cmake .; make) took just under half a minute. Adding an exponentiation test
nearly doubles the time.Adding some Pythagoras
bumps the time to 3 minutes.Currying works fine too; one can simplify the definitions
to I tried to see at what point things break; perhaps at this point that yields an error: pasting formed ';_IMPL', an invalid preprocessing tokenI like the choice of False for Nil, which I also made in my Binary Lambda Calculus [1]
[1] https://tromp.github.io/cl/Binary_lambda_calculus.html#Delim...