3 ms·
Really? I've worked on compilers for a long time and the AST generation is typically the easiest part. Optimizations, and different target backends are easily
by chollida1 14y ago
Really?
I've worked on compilers for a long time and the AST generation is typically the easiest part.
Optimizations, and different target backends are easily an order of magnitude harder.
That's why every new language typically begins as a simple AST tree walker, that's the easy part.
They can they "graduate" to byte codes and then to asm generation if appropriate.
- DoubleCluster 14y agoDid you ever try to translate one language into another? Usually it's just generating the AST that is the hard part, then you can just spit out code and let the compiler for the target language do the hard stuff.
- chollida1 14y agoHmm, for me it's always been tougher trying to determine what the source language should compile down into. AST generation is usually simple. It's the conversion to the other language that usually get's difficult.
- c3d 14y agoAgreed. fortunately, there's LLVM for the back end now. And XL for the front end/AST
- noblethrasher 14y agoThat's fair. But in my world “compiler” and “optimizing compiler” are very different things. Also, targeting different backends is drudgery but I never thought of it as being hard.
- chollida1 14y ago> That's fair. But in my world “compiler” and “optimizing compiler” are very different things Ah, ok. In that case, I'd agree.