Racket’s macros are fantastic for building DSLs that mix well with general-purpose code and inherit Racket’s extensibility. But they suffer when it comes time to equip your DSL with an optimizing compiler or static analyses. There, the very closeness with Racket that makes language mixing and extension so easy gets in the way. In this talk I’ll present my `syntax-spec` metalanguage. It extends Racket’s macro system to allow specifications of DSLs as fragments of a multi-language: DSL and Racket code mix, but only at carefully delineated boundaries. The result is that optimizing compilation, language mixing, and extension combine constructively rather than clash.
0 commit comments