Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Only suckers forget about optimization passes. ;-)

Don't forget that:

- Optimization work on llvm and other compilers is still happening in anger.

- Frontend is a relative term. For example, the "frontend" to LLVM when WebKit used LLVM as a "backend" was a full-blown compiler with >100KLoC of code. Since then that "frontend" grew its own backend and dropped LLVM, but point is, just because you're a frontend doesn't mean you don't have optimizations. Frontend doesn't just mean parser.

- Rust's or Haskell's "frontends" to LLVM are seriously impressive compilers and the complexity is not to do with parsing AFAICT but all the other stuff (type checking comes to mind but there's also really impressive lowering and optimization).

- Backends aren't just complex because of optimization passes. The register allocator and instruction selector aren't so much optimization passes as necessary transformations for turning a compiler's IR into machine code. Those things just grow and grow.

- The whispers in the wind that I'm hearing from compiler folks looking to make bank is that there's shitloads of work to be done porting compilers to new targets. It's much more work to port a compiler to a new target than it is to write a parser. That said, writing a frontend for a language as complex as Rust/Haskell/etc is probably on the same order of complexity as parting a backend or maybe even more complex - but that's not because of parsing; it's usually either because of System F type shit (if you have a statically typed language) or dynamic type inference (if you have a dynamically typed language).



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

Search: