Re:A look at asm.js and the future with WebAssembly
by vanderZwan on Saturday January 16, 2016 @12:05PM
(#10915824)
Getting a bit off-topic here, but since I have been wondering about what makes "transpiling" different from the existing word of "compiling", would you say that proper usage would be "reversible compilation with zero loss of information"?
Re:A look at asm.js and the future with WebAssembly
by mchahn on Saturday January 16, 2016 @01:03PM
(#10916097)
> would you say that proper usage would be "reversible compilation with zero loss of information"?
Isn't that possible with many languages since the compiled code snippets are obvious.
I've always thought transpiling was defined as compiling from one language to another language that is at the same abstraction level. Usually compiling goes from a high abstract level to lower.
Also, I hate the "transpiling" verb and your usage of it is incorrect. We started using "to transpile" as a way to inform people that some compilers, such as CoffeeScript, have a Javascript output that's still readable and that doesn't lose abstraction in the process, the "transpiler" being defined as a "source to source compiler". People preferred this term to convey the information that some languages like CoffeeScript are just mere syntactic sugar over Javascript.
On one hand that's superfluous when the very definition of a "compiler" is that of a program that transforms source code from one programming language to another. And on the other hand, people are using it incorrectly. The minified output of something like Google's Closure compiler, coupled with the higher-level abstractions in languages like ClojureScript or Scala.js, etc, leads to a Javascript output that is no longer readable and that does lose abstraction in the process.