-
Book Overview & Buying
-
Table Of Contents
Building Programming Language Interpreters
By :
Structuring your C++ project in a way that facilitates test-driven development will allow you to very easily iterate on more and more complex features while mitigating the risk of breaking existing functionality. We learned this in this chapter. The history captured in the Git repository also plays an important role in understanding how the project evolves, as we saw in this chapter.
The building of a stack machine in C++ can greatly benefit from type erasure, whereby the code handling the stack does not need to constantly manipulate every single operation type. Instead, you should be able to categorize the operations in terms of what interfaces they need the interpreter to provide, which will allow you to reduce the amount of code that you need to write, without any loss in type safety. This was also covered.
At the same time, it’s important to always continue reevaluating the overall structure of the code, and it is often a good idea to take a step back and...
Change the font size
Change margin width
Change background colour