← Back to context

Comment by mistercow

13 years ago

Sure, but that doesn't make it a good intermediate representation for a programming language. I really like CoffeeScript, but compiling to it would be insanity.

That said, there are some good reasons for compiling to C. Not every architecture has a backend for LLVM yet, after all.

Some would say "I really like JavaScript, but compiling to it would be insanity." And yet CoffeeScript is there. How is that better than a language which compiles to C?

  • If you read the second part of my comment, you'll see that I agree that there is a legitimate reason to compile to C. It turns out to be identical to the legitimate reason for compiling to JS - some platforms can't be targeted directly, so you make do with the options you have.

    I was not disputing the conclusion that it can make sense to compile to C. I was just saying that "people like C" doesn't support that conclusion.