Live data from Hacker News

Cljs2go – A ClojureScript to Go compiler

github.com

11–14 of 14 posts

Re: Cljs2go – A ClojureScript to Go compiler

#11

Technically speaking it is a transpiler , not a compiler .

This one statement could easily trigger an avalanche larger than all the other comments combined. I’ll start: What is the difference between a transpiler and a compiler?

A transpiler is a compiler that will transform a high level language into another high level language. Examples: Coffeescript, Sass, this thing.

Compiling is a more generic term that includes transpiling, but is usually used to mean the kind that transforms into assembly/bytecode/executables.

Edit: Since I have no interest in furthering a thread on a legitimate question, let me just answer to the replies here: There is no reason to make the difference other than pickiness, and there is no legitimate claim as to what is or isn't high level. Use your common sense, computers don't care whether it's a transpiler or compiler.

Re: Cljs2go – A ClojureScript to Go compiler

#12

Earlier quoted context omitted.

This one statement could easily trigger an avalanche larger than all the other comments combined. I’ll start: What is the difference between a transpiler and a compiler?

A transpiler is a compiler that will transform a high level language into another high level language. Examples: Coffeescript, Sass, this thing. Compiling is a more generic term that includes transpiling, but is usually used to mean the kind that transforms into assembly/bytecode/executables. Edit: Since I have no interest in furthering a thread on a legitimate question, let me just answer to the replies here: There…

If compiling includes transpiling, then isn't it both? Why make the distinction?

Re: Cljs2go – A ClojureScript to Go compiler

#13

Earlier quoted context omitted.

This one statement could easily trigger an avalanche larger than all the other comments combined. I’ll start: What is the difference between a transpiler and a compiler?

A transpiler is a compiler that will transform a high level language into another high level language. Examples: Coffeescript, Sass, this thing. Compiling is a more generic term that includes transpiling, but is usually used to mean the kind that transforms into assembly/bytecode/executables. Edit: Since I have no interest in furthering a thread on a legitimate question, let me just answer to the replies here: There…

What makes a high level language?

Is Assembly high level? In that case GCC would be a transpiler, not a compiler.

What about C? If C is considered high level, the original C++ compiler would have to be considered a transpiler rather than a compiler. Same goes for Chicken Scheme, or any of the other compilers that target C.

If we take the example even further, what about Fog Creek's Wasabi, which compiles to either PHP or VBScript? Or Ruby's compiler, which takes Ruby source and outputs very high level bytecode.

I don't think there's much value in distinguishing 'transpilers' from compilers. It's still the exact same principles at play, no matter what your source or target languages are.

Re: Cljs2go – A ClojureScript to Go compiler

#14

Earlier quoted context omitted.

A transpiler is a compiler that will transform a high level language into another high level language. Examples: Coffeescript, Sass, this thing. Compiling is a more generic term that includes transpiling, but is usually used to mean the kind that transforms into assembly/bytecode/executables. Edit: Since I have no interest in furthering a thread on a legitimate question, let me just answer to the replies here: There…

If compiling includes transpiling, then isn't it both? Why make the distinction?

Many argue that there's no difference. However, if I were to attempt a definition (not that I use the word), I'd say that transpiling is compilation from a language to another language with same or similar level of abstraction, whereas compiling might be to a language with lower level of abstraction.
Post reply on HN