The difference between preprocessors and transpilers
The Unicon translator writes its output in Icon and then invokes an extended version of the Icon translator icont
to generate bytecode. The use of a preprocessor and a full parser smells like things a transpiler would do, but the fact that Unicon’s output looks almost identical to its input except when classes are involved makes Unicon feel like it is still a preprocessor in some respects.
Fundamentally, a transpiler writes out source code in a different high-level language than its input. Usually, there is in fact a difference in language level, and usually, the transpiler transpiles from a higher-level language down to a slightly lower-level language. The poster children for this process are the myriad of languages that are implemented by writing out C code and using a C compiler as their code generator. C is effectively used as a portable assembly language. The considerable optimization performed by most C compilers...