|
|
 |
 |
 |
 |
C's compromise and recognition to the new C++
K&R say in the preface of their 2nd edition, "We used Bjarne Stroustrup's C++ translator extensively for local testing of our programs". I don't know where they used the C++ in projects or only this book source. But is it a message of the compromise and recognition to the new C++?
On Mon, 04 Jun 2007 19:57:43 -0700, "lovecreatesbea@gmail.com" <lovecreatesbea@gmail.com> wrote in comp.lang.c: > K&R say in the preface of their 2nd edition, "We used Bjarne > Stroustrup's C++ translator extensively for local testing of our > programs". > I don't know where they used the C++ in projects or only this book > source. But is it a message of the compromise and recognition to the > new C++?
No, this is a recognition of the fact that this book, and its code, was written beginning several years before the first ANSI C standard was finalized and approved. The single most important feature added to the C language _ever_, not just by the first ANSI standard, was function prototypes. C++ had prototypes from the beginning, as they are necessary for function overloading. Most C compilers at the time did not. So using the Cfront preprocessor was the best way to get prototype checking. -- Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://c-faq.com/ comp.lang.c++ http://www.parashift.com/c++-faq-lite/ alt.comp.lang.learn.c-c++ http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
On 6 5 , 12 10 , Jack Klein <jackkl@spamcop.net> wrote:
> On Mon, 04 Jun 2007 19:57:43 -0700, "lovecreatesbea @gmail.com" > <lovecreatesbea @gmail.com> wrote in comp.lang.c: > > K&R say in the preface of their 2nd edition, "We used Bjarne > > Stroustrup's C++ translator extensively for local testing of our > > programs". > > I don't know where they used the C++ in projects or only this book > > source. But is it a message of the compromise and recognition to the > > new C++? > No, this is a recognition of the fact that this book, and its code, > was written beginning several years before the first ANSI C standard > was finalized and approved. > The single most important feature added to the C language _ever_, not > just by the first ANSI standard, was function prototypes. C++ had > prototypes from the beginning, as they are necessary for function > overloading. Most C compilers at the time did not. > So using the Cfront preprocessor was the best way to get prototype > checking. > -- > Jack Klein > Home:http://JK-Technology.Com > FAQs for > comp.lang.chttp://c-faq.com/ > comp.lang.c++http://www.parashift.com/c++-faq-lite/ > alt.comp.lang.learn.c-c++http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
i'm a Chinese student, my msm ID is :flyrea@163.com, could you please add me as your fiend??
On 5 Jun, 05:10, Jack Klein <jackkl@spamcop.net> wrote:
> On Mon, 04 Jun 2007 19:57:43 -0700, "lovecreatesbea @gmail.com" > <lovecreatesbea @gmail.com> wrote in comp.lang.c: > > K&R say in the preface of their 2nd edition, "We used Bjarne > > Stroustrup's C++ translator extensively for local testing of our > > programs". > > I don't know where they used the C++ in projects or only this book > > source. But is it a message of the compromise and recognition to the > > new C++? > No, this is a recognition of the fact that this book, and its code, > was written beginning several years before the first ANSI C standard > was finalized and approved. > The single most important feature added to the C language _ever_, not > just by the first ANSI standard, was function prototypes. C++ had > prototypes from the beginning, as they are necessary for function > overloading. Most C compilers at the time did not.
what I've always been curious about is why prototypes wern't in from the beginning? You actual type *less* with prototypes. > So using the Cfront preprocessor was the best way to get prototype > checking.
-- Nick Keighley
Nick Keighley said: > On 5 Jun, 05:10, Jack Klein <jackkl @spamcop.net> wrote: <snip> >> The single most important feature added to the C language _ever_, not >> just by the first ANSI standard, was function prototypes. C++ had >> prototypes from the beginning, as they are necessary for function >> overloading. Most C compilers at the time did not. > what I've always been curious about is why prototypes wern't in > from the beginning? You actual type *less* with prototypes.
Because dmr didn't think of using them? -- Richard Heathfield "Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk email: rjh at the above domain, - www.
Richard Heathfield wrote, On 05/06/07 09:51: > Nick Keighley said: >> On 5 Jun, 05:10, Jack Klein <jackkl@spamcop.net> wrote: > <snip> >>> The single most important feature added to the C language _ever_, not >>> just by the first ANSI standard, was function prototypes. C++ had >>> prototypes from the beginning, as they are necessary for function >>> overloading. Most C compilers at the time did not. >> what I've always been curious about is why prototypes wern't in >> from the beginning? You actual type *less* with prototypes. > Because dmr didn't think of using them?
Did B have prototypes? If not then it was probably a carry over. Also possibly to simplify the compiler. -- Flash Gordon
Nick Keighley <nick_keighley_nos @hotmail.com> writes: > On 5 Jun, 05:10, Jack Klein <jackkl @spamcop.net> wrote: >> On Mon, 04 Jun 2007 19:57:43 -0700, "lovecreatesbea @gmail.com" >> <lovecreatesbea @gmail.com> wrote in comp.lang.c: >> > K&R say in the preface of their 2nd edition, "We used Bjarne >> > Stroustrup's C++ translator extensively for local testing of our >> > programs". >> > I don't know where they used the C++ in projects or only this book >> > source. But is it a message of the compromise and recognition to the >> > new C++? >> No, this is a recognition of the fact that this book, and its code, >> was written beginning several years before the first ANSI C standard >> was finalized and approved. >> The single most important feature added to the C language _ever_, not >> just by the first ANSI standard, was function prototypes. C++ had >> prototypes from the beginning, as they are necessary for function >> overloading. Most C compilers at the time did not. > what I've always been curious about is why prototypes wern't in > from the beginning? You actual type *less* with prototypes.
C evolved from an untyped language, B. One gets the feeling from what they have written about it that the designers wanted to add as little type information as possible. They were great fans of the simplicity of B (and BCPL) and had seen the huge complexity of "modern" typed languages like Algol 68. Type information was added so that character arrays (and hence strings) could be supported properly on the byte addressed hardware that was being targeted. I guess just enough was put in so + (and friends) would not what to add to a pointer. You don't need prototypes for that. -- Ben.
In article <87ejkqiqxn.@bsb.me.uk>, Ben Bacarisse <ben.use@bsb.me.uk> wrote: >They were great fans of the simplicity >of B (and BCPL) and had seen the huge complexity of "modern" typed >languages like Algol 68.
If you're going to put quotes around "modern" you should put them around "huge" too. -- Richard -- "Consideration shall be given to the need for as many as 32 characters in some alphabets" - X3.4, 1963.
rich @cogsci.ed.ac.uk (Richard Tobin) writes: > In article <87ejkqiqxn. @bsb.me.uk>, > Ben Bacarisse <ben.use @bsb.me.uk> wrote: >>They were great fans of the simplicity >>of B (and BCPL) and had seen the huge complexity of "modern" typed >>languages like Algol 68. > If you're going to put quotes around "modern" you should put them around > "huge" too.
If you mean that both "huge" and "modern" were perceptions of the time, then I wholeheartedly agree. -- Ben. |
 |
 |
 |
 |
|