3 ms·
I was curious so looked up McCarthy's paper. Appendix B has code and pseudo code for minimal interpreter. Takes one page. Primitives are easy to code, too. It w
by nickpsecurity 10y ago
I was curious so looked up McCarthy's paper. Appendix B has code and pseudo code for minimal interpreter. Takes one page. Primitives are easy to code, too. It would surpise me if that took much larger than 500loc to implement.
- qwertyuiop924 10y agoLexical scope, in particular, is very easy to implement. Call/cc or exceptions are a bit tougher, but it can be done. And all defaults take is a bit of extension to the lambda. In fact, defaults can be added atop the language with a macros, as can keyword arguments. Macro expanders are a bit harder to write than the functionality itself, however. Especially if you want a good one.