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

First, why is C nearly always required for writing compilers?

Because the author is clueless. Sure, you might want to compile your language down to C, but there's no point in writing the compiler in C, unless you want to make your life difficult for no good reason. Nobody cares how fast your compiler runs. (What I should say is, tokenizing the input, building the AST, and traversing the AST is going to be just as fast implemented in Lisp/ML/Perl/Ruby as it is implemented in C. Except you'll get a more correct compiler in less time. "malloc" is for chumps.)

But, these days, there's no point in compiling down to C. It's much easier (and yields a potentially faster runtime) to compile to LLVM or the JVM or Parrot.




Nobody cares how fast your compiler runs.

I take it you've never written a C++ program which depends on heavy template metaprogramming.




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

Search: