Back in Chapter 6, we looked at the DLR Hosting API. In that chapter, we saw that the Hosting API provides a uniform way for a host language like C# to embed languages like IronPython and IronRuby. Although the Hosting API provides a good layer of abstraction between host and hosted languages, there’s still room for pushing the level of abstraction even higher—and that’s the topic of this chapter. We’ll go through the design and implementation of a domain specific language (DSL) called Stitch that I developed for language hosting. Using Stitch, we can host not just DLR-based languages but also languages like Windows PowerShell—uniformly and declaratively. The set of languages Stitch is capable of hosting is extensible. Moreover, the runtime of the Stitch language provides execution modes for running code sequentially or in parallel.
Unable to display preview. Download preview PDF.