Hacker News new | ask | show | jobs
by tom_mellior 3217 days ago
> It's shorter than writing "source-to-source compiler"

Brevity isn't everything. But more importantly, "transpiler" (like "source-to-source compiler") does not say what you are compiling from, and what you are compiling to. In order for the term "transpiler" to be useful, you need to specify those things. Anything you think you imply by using the term is not, in fact, implied.

If you compare the lengths of "JavaScript to Pascal compiler" and "JavaScript to Pascal transpiler", you might be in for a surprise!

2 comments

I think the current definition of "transpiler", the way it's used in the wild, means "compiles $something to JavaScript". I haven't seen anyone using this word for anything else than compiling to JS.
It may lack some specificity, but it makes you look for the terms for "from" and "to".

It eliminates bytecode compilers and native compilers from the conversation immediately.

> It's not a native compiler, it's a transpiler

If this was said, you wouldn't then ask if it compiled for a VM, or if it could directly produce small binaries.

I wouldn't say the term is completely redundant. Only when you introduce it for the first time.

E.g.

> That's not possible. It's a transpiler. Back to the topic at hand...