Chapter 10. Domain-Specific Embedded Languages
If syntactic sugar didn't count, we'd all be programming in assembly language.
This chapter covers what we believe to be the most important application area for metaprogramming in general and C++ metaprogramming in particular: building domain-specific embedded languages (DSELs).
Most of the template metaprogramming techniques we use today were invented in the course of implementing a DSEL. C++ metaprograms first began to be used for DSEL creation sometime in 1995, with impressive results. Interest in metaprogramming has grown steadily ever since, butmaybe because a new way to exploit templates seems to be discovered every weekthis excitement is often focused on implementation techniques. As a result, we've tended to overlook the power and beauty of the design principles for which the techniques were invented. In this chapter we'll explore those principles and paint the big picture behind the methodology.
 |