3 ms·
I see a preprocesser as something distinct from a transpiler - a way to extend a language rather than transform it into another one. This debate is really just
by duncanawoods 9y ago
I see a preprocesser as something distinct from a transpiler - a way to extend a language rather than transform it into another one.
This debate is really just about how terms fit a continuum from extension (supported by language constructs) -> preprocesser (add features that can't be supported by host language extensions) -> transpiler (support a totally different but conceptually similar language) -> compiler (conceptual differences from target requiring a more self-standing implementation that tackles fundamental problems).
The separation between the levels of sophistication are fuzzy and matters of degree. A single project might legitimately mature through the stages. For example, I don't object to calling Typescript a compiler once it began to generate code for sophisticated concepts not supported by the underlying language.