Is Google Closure a true compiler?

Posted by James Allardice on Programmers See other posts from Programmers or by James Allardice
Published on 2012-11-20T13:53:46Z Indexed on 2012/11/20 17:19 UTC
Read the original article Hit count: 438

This question is inspired by the debate in the comments on this Stack Overflow question. The Google Closure Compiler documentation states the following (emphasis added):

The Closure Compiler is a tool for making JavaScript download and run faster. It is a true compiler for JavaScript. Instead of compiling from a source language to machine code, it compiles from JavaScript to better JavaScript.

However, Wikipedia gives the following definition of a "compiler":

A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language... A language rewriter is usually a program that translates the form of expressions without a change of language.

Based on that, I would say that Google Closure is not a compiler. But the fact that Google explicitly state that it is in fact a "true compiler" makes me wonder if there's more to it. Is Google Closure really a JavaScript compiler?

© Programmers or respective owner

Related posts about JavaScript

Related posts about terminology