Chapter 8. Metaprogramming

This chapter covers

  • Learning about literate CoffeeScript
  • Constructing domain-specific languages
  • Writing programs that write programs
  • Being metacircular: CoffeeScript in CoffeeScript

The term metaprogramming is often used to refer to any programming technique sufficiently complicated that you should think thrice before using it. This chapter is not about writing complicated programs. Metaprogramming is also often used to refer to the use of metaobjects, where you create objects that create objects. This chapter is not about programming metaobjects—you were already working with metaobjects back in chapter 5. So, then, what is this chapter about?

The most succinct description of metaprogramming is programs that ...

Get CoffeeScript in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.