News for hackers. Stuff that matters.
Re:Show HN: A self-hosted js compiler in 1k loc by munificent on Friday February 10, 2017 @03:04PM (#13618417)
> It isn't really a compiler, because the target language is the same as the source.

I think it could still be deemed a "compiler" even if it output the same language if it was doing some significant transformation or modification of it.

But, yes, in this case I think you're right and a "pretty-printer" is a better description of it.

Re:Show HN: A self-hosted js compiler in 1k loc by EpicEng on Friday February 10, 2017 @08:54PM (#13620485)
Compiler:

a program that converts instructions into a machine-code or lower-level form so that they can be read and executed by a computer

Since they add features, I guess this would qualify as it outputs a "lower level form", but man it's really pushing the definition.

Re:Show HN: A self-hosted js compiler in 1k loc by bbcbasic on Friday February 10, 2017 @08:51PM (#13620473)
I'd say transpiler, or at least preprocessor. It does add a language feature, after all.
Re:Show HN: A self-hosted js compiler in 1k loc by Schampu on Sunday February 12, 2017 @08:24AM (#13628210)
I just added a second feature called "inout", which lets you pass variables by reference