Chapter 12. DSL implementation challenges
In this chapter
- Scaling DSL implementations
- Deploying DSL scripts in production
- Treating code as data
- Creating user-extensible languages
The first part of this book dealt with building a DSL from scratch, and the second part with testing, documenting, versioning, and presenting the DSL. Between the two, there are still some gaps—details that are important for creating successful DSLs that we couldn’t look at before you gained some experience building DSLs in Boo.
In this chapter, we’re going to look at some of the more interesting challenges for DSLs, and in the next chapter we’ll make use of many of the solutions outlined in this chapter to build a real-world DSL.
Note
Many of the topics in this chapter involve AST manipulation, which we covered in chapter 6. As a quick reminder, the abstract syntax tree (AST) is how the compiler represents the code text internally. Boo allows you to access and modify the AST, and these modifications will affect the generated code, producing the result that you want.