In which language was C compiler written | 10 Sep 2009

shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
In which language was the first ever C compiler written?
0
Kshiteej's Avatar, Join Date: Jul 2009
Contributor
C language
0
Kshiteej's Avatar, Join Date: Jul 2009
Contributor
BTW today's date is 10 september not 11 september.
0
Mridula's Avatar, Join Date: Mar 2008
Pro contributor
First version was written in Assembly Language !!
0
Mridula's Avatar, Join Date: Mar 2008
Pro contributor
Yes. It is 10th Sept :-)
0
SaswatPadhi's Avatar, Join Date: May 2009
~ Б0ЯИ Τ0 С0δЭ ~
I guess, the first C compiler was written in "B Language", which can be "thought of as C without types".

The first B compiler was written in TMG

Source :: http://plan9.bell-labs.com/who/dmr/chist.html
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by Mridula View Post
Yes. It is 10th Sept :-)
My Apology
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Bizarrely enough I reckon kshiteej is correct, reading carefully through http://cm.bell-labs.com/cm/cs/who/dmr/chist.html and specifically "In 1971 I began to extend the B language by adding a character type and also rewrote its compiler to generate PDP-11 machine instructions instead of threaded code. Thus the transition from B to C was contemporaneous with the creation of a compiler capable of producing programs fast and small enough to compete with assembly language. I called the slightly-extended language NB, for `new B.' "

It seems from this that as NB was developed further, there came a point where he decided to call the new language C:

"After creating the type system, the associated syntax, and the compiler for the new language, I felt that it deserved a new name; NB seemed insufficiently distinctive. I decided to follow the single-letter style and called it C"

So the question really hinges on whether or not the compiler itself used the type system and syntax mentioned here. If it did, then the compiler itself would have been a C compiler. So the answer is either C as kshiteej says, or it's NB, if you can't accept the mildly paradoxical view that the first C compiler was written in C.

I guess we'd need DMR's view on the question to be certain what the correct answer is.
0
naimish's Avatar
Banned
Comp1 is the compiler for C written in C
0
naimish's Avatar
Banned
But I think it's obvious that the very first C compiler ever written was not written in C, but more probably in assembly language or possibly in a predate language like BCPL.