In addition to having the usual constructs of a general-purpose language, '''multi-stage languages''' internalize the notions of runtime program generation and execution. Thus, multi-stage languages provide the programmer with the essence of '''partial evaluation''' and '''program specialization''' techniques, both of which have been shown to lead to dramatic resource-utilization gains in a wide range of applications, starting from implementations of domain-specific compilers, to high-performance operating systems. Multi-stage languages make it possible to write generic and highly-parameterized programs that do not pay unnecessary runtime overheads.
Checkout MetaOCaml, our implementation of multi-stage programming based on OCaml.
Multi-Stage Programming Papers
Introductions
Multi-stage programming with explicit annotations, PEPM'97 (a longer version appears in TCS'00.)
Multi-stage programming: Its theory and its applications (Th'99)