4 ms·
It's truly excellently written C++ code, and they don't go nuts with fancy C++ voodoo template meta-trans-factory-programming tricks or whatnot. And have you se
by jey 17y ago
It's truly excellently written C++ code, and they don't go nuts with fancy C++ voodoo template meta-trans-factory-programming tricks or whatnot. And have you seen what happens when you write a huge compiler in C? This: http://gcc.gnu.org/wiki/reload http://gcc.gnu.org/wiki/reload And I don't think you can reasonably argue that GCC's hackers are sub-par either. ;-)
Language features for abstraction and encapsulation are pretty important for something that huge.
- krakensden 17y agoI'd argue that there is an age factor at play- GCC is older, designed under different (ie, much more stringent with regards to resources) constraints. GCC also has a perennial problem attracting and managing developers, which LLVM seems to have avoided.
- jey 17y agoIt's really not the age or resources that hamper it (from experience hacking it). Well, OK, the age does matter -- but only because it's C. It wouldn't have been so bad if they didn't have to reinvent basic things. GCC has its own garbage collector, a set of bizzare hacks to replace inheritance, amongst other atrocities. None of these have to do with resource constraints, and nearly all have to do with the low-level nature of C.
- beza1e1 17y agoI'm hacking on a compiler written in C, which isn't worse than LLVM: http://libfirm.org http://libfirm.org
- eru 17y agoWhy do a compiler in C at all? I mean, why should a low-level systems language (that values speed above everything) be particularly suited to transforming programs from one language into another?
- nvoorhies 17y agoBecause this allows you to compile in places and times where a language with more suitability towards compilation but heavier time or memory needs would be unsuitable. One example that pops to mind is shader programs on a GPU.
- eru 17y agoWhere (and when) would the compiler for the shader run?