2 comments

[ 2.7 ms ] story [ 11.7 ms ] thread
It's always great to see new people work on their own programming languages, but I have to ask: why a tree-walking interpreter? This is probably the least optimal way to implement a language, whether you are a beginner or not. While interpreters are often believed to be the right way for beginners to implement languages, compilers are actually much easier to write, much easier to maintain, and yield much better performance than interpreters if you are doing anything more than a throwaway exercise, and judging by this Github page your ambitions are larger than that. If you don't know where to start with compilers, I recommend reading Abdulaziz Ghuloum's "An Incremental Approach to Compiler Construction" paper [0], and then moving on to Andrew Appel's "Modern Compiler Implementation in ML" book.

[0] http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf

Thanks for the feedback. Yes, I agree. This is not optimal. The project was more a learning experience for me with language interpretation. I have since learned that it is better to implement a byte-code emitter and a stack-based VM. I just wanted to get the tree-walker to a reasonable place before moving on.

Thanks for the links. These are valuable.