Hacker News new | past | comments | ask | show | jobs | submit login

I wonder if the author would be surprised by how many language compilers have targeted C for their output.



I don't think he'd be surprised. Didn't C++ initially compile to C? He mentioned how these "to-JS" languages are more like C++ to C than C to assembly.


C++ only briefly compiled to C, but compilation-to-C is a time-honored compiler building trick.

It's not always reasonable to make inferences about the quality of a programming language by reasoning about its compilation target. It's probably never reasonable when you're talking about compiling-to-C, which is basically a macro assembler.


I can't seem to find the discussion now, but the C-- people (http://www.cminusminus.org/) found that compilation-to-C was a requirement from some large companies, at least as a backup path, for anything not solidly established. Companies wanted to know that if this fancy new thing's maintenance dropped off a cliff in 10 years, they could at least compile to C, and thereby leverage C compiler ports to new architectures, rather than depending on a straight-to-asm path that may or may not be maintained decades from now.


Not even briefly, I'd say. Cfront-based compilers were the rule rather than the exception well into the 1990's. It wasn't until the death of proprietary Unix and the emergence of msvc and gcc that the world got used to the idea of C++ being a first class language.


You're probably older than I am. I started my career in C/C++ and I've never used a Cfront-based compiler. (My first dev job was in the mid '90s).


So C++ had existed for 10+ years by the time you started with it, right?

I was still having to deal with Cfront-based compilers (the one on HP-UX, for example) in 2002 or so. Amusingly enough, it actually had really good error messages.


Borland/Turbo C++ did it for a lot of us too.


I assumed that knowledge is what prompted the comparison.


I know he knows C++ targets it, but I get the impression he thinks that the result of targeting C is a language like C++. That's not the case. Good languages have also been compiled to C.


I know it's just an off-hand little dig at C++, & I'm sure you know more than enough about C++ to be confident making such a dig, but damn the relentless C++ bashing gets really old to those of us who are happily productive with it.

Just saying'.





Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: