This has always racked my brain. Compilers compile code. I imagine that the compiler is coded. So to actually run the code for a compiler, you'd have to compile it.

How was the first compiler compiled?

link|improve this question

78% accept rate
1  
It's like understanding recursion, you have to first understand recursion. – Urda Apr 25 '10 at 20:26
feedback

1 Answer

up vote 13 down vote accepted

The first compiler was written in assembly for the A-0 programming language in 1952. See Wikipedia for more info.

The first compiler that could compile itself was written for and in Lisp in 1962. This is called a self-hosting or bootstrapping compiler.

link|improve this answer
3  
For a long time, many programs (including compilers) were written directly in machine code or in assembly language. – grawity Apr 25 '10 at 12:48
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.