Comment by eslaught

5 years ago

Different languages help because the different parts of the program expose different needs.

You want the generated code to be low-level, because you want it to be fast, free of dependencies (interpreter, JIT, GC, etc.), and you care less about abstractions. You want the metaprogram to be high-level because you want nice abstractions, and it runs at compile-time anyway so you care less about performance.

Sure, people are working on languages that can do both, but it's easier to make it work with two different languages that can be tuned specifically to their niches.