ashley maher wrote: > However, after completing my course, I then looked at gcc.
GCC is an incredibly complex beast. Partly that is a result of it being written in C, a language totally unsuited to writing compilers. The other complexity is that GCC has a number of front ends (C, C++, Java etc), two (I think) internal representations and a huge number of backends (X86, PowerPC, Arm, Java bytecode etc). About 5-6 years ago I pulled down the GCC sources hoping to be able to hack in a small feature I wanted. At the time, the minimal sources for just the C compiler was about 200k lines of code. I spent about a week trying to make sense of it before giving up. About 4 years later I tried to do the same hack for the Ocaml compiler. The Ocaml compiler (written in Ocaml) was about 50k lines of code and was extremely comprehensible. I had a working patch within about 3 hours. Ocaml however is a very good language for writing compilers. Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "The power of accurate observation is commonly called cynicism by those who don't have it." -- George Bernard Shaw _______________________________________________ coders mailing list coders@slug.org.au http://lists.slug.org.au/listinfo/coders