In this chapter, we will explore D's code generation capabilities and cover the following recipes:
Creating user-defined literals
Parsing a domain-specific language
Generating data structures from text diagrams
Automating dynamic calls with multiple dispatch
Building a lookup table
Using string parameters to change functions
Wrapping instance methods
Using
opDispatch
to generate propertiesDuck typing to a statically-defined interface