Go4Expert

Go4Expert (http://www.go4expert.com/)
-   $1 Daily Competition (http://www.go4expert.com/contests/daily-competition/)
-   -   In which language was C compiler written | 10 Sep 2009 (http://www.go4expert.com/contests/language-c-compiler-written-10-sep-2009-t19376/)

shabbir 10Sep2009 17:43

In which language was C compiler written | 10 Sep 2009
 
In which language was the first ever C compiler written?

Kshiteej 10Sep2009 17:53

Re: In which language was C compiler written | 11 Sep 2009
 
C language

Kshiteej 10Sep2009 18:00

Re: In which language was C compiler written | 11 Sep 2009
 
BTW today's date is 10 september not 11 september. :D

Mridula 10Sep2009 18:04

Re: In which language was C compiler written | 11 Sep 2009
 
First version was written in Assembly Language !!

Mridula 10Sep2009 18:05

Re: In which language was C compiler written | 11 Sep 2009
 
Yes. It is 10th Sept :-)

SaswatPadhi 10Sep2009 18:11

Re: In which language was C compiler written | 11 Sep 2009
 
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

shabbir 10Sep2009 22:03

Re: In which language was C compiler written | 11 Sep 2009
 
Quote:

Originally Posted by Mridula (Post 57196)
Yes. It is 10th Sept :-)

My Apology

xpi0t0s 10Sep2009 22:46

Re: In which language was C compiler written | 10 Sep 2009
 
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.

naimish 11Sep2009 08:45

Re: In which language was C compiler written | 10 Sep 2009
 
Comp1 is the compiler for C written in C

naimish 11Sep2009 08:49

Re: In which language was C compiler written | 10 Sep 2009
 
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.


All times are GMT +5.5. The time now is 19:37.