By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,794 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

C's compromise and recognition to the new C++

P: n/a
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++?

Jun 5 '07 #1
Share this Question
Share on Google+
12 Replies


P: n/a
On Mon, 04 Jun 2007 19:57:43 -0700, "lovecreatesbea...@gmail.com"
<lo***************@gmail.comwrote 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
Jun 5 '07 #2

P: n/a
On 6 5 , 12 10 , Jack Klein <jackkl...@spamcop.netwrote:
On Mon, 04 Jun 2007 19:57:43 -0700, "lovecreatesbea...@gmail.com"
<lovecreatesbea...@gmail.comwrote 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 :fl*******@163.com, could you
please add me as your fiend??

Jun 5 '07 #3

P: n/a
On 5 Jun, 05:10, Jack Klein <jackkl...@spamcop.netwrote:
On Mon, 04 Jun 2007 19:57:43 -0700, "lovecreatesbea...@gmail.com"
<lovecreatesbea...@gmail.comwrote 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

Jun 5 '07 #4

P: n/a
Nick Keighley said:
On 5 Jun, 05:10, Jack Klein <jackkl...@spamcop.netwrote:
<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.
Jun 5 '07 #5

P: n/a
Richard Heathfield wrote, On 05/06/07 09:51:
Nick Keighley said:
>On 5 Jun, 05:10, Jack Klein <jackkl...@spamcop.netwrote:

<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
Jun 5 '07 #6

P: n/a
Nick Keighley <ni******************@hotmail.comwrites:
On 5 Jun, 05:10, Jack Klein <jackkl...@spamcop.netwrote:
>On Mon, 04 Jun 2007 19:57:43 -0700, "lovecreatesbea...@gmail.com"
<lovecreatesbea...@gmail.comwrote 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.
Jun 5 '07 #7

P: n/a
In article <87************@bsb.me.uk>,
Ben Bacarisse <be********@bsb.me.ukwrote:
>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.
Jun 5 '07 #8

P: n/a
ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
In article <87************@bsb.me.uk>,
Ben Bacarisse <be********@bsb.me.ukwrote:
>>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.
Jun 5 '07 #9

P: n/a
flyreally wrote:
>
.... snip ...
>
i'm a Chinese student, my msm ID is :fl*******@163.com, could you
please add me as your fiend??
Oh very well. I have a large collection of fiends (look it up).

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 6 '07 #10

P: n/a
Nick Keighley wrote:
Jack Klein <jackkl...@spamcop.netwrote:
.... 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.
Probably because C was born out of B and Fortran. C just grew,
while Pascal was designed.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 6 '07 #11

P: n/a
Richard Tobin wrote:
Ben Bacarisse <be********@bsb.me.ukwrote:
>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.
Also for C. Compare the size of the C standard and the Pascal
standard. The C version is about twice the size of the _extended_
Pascal standard. This is because there are more peculiar
conditions to consider.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

--
Posted via a free Usenet account from http://www.teranews.com

Jun 6 '07 #12

P: n/a
On Tue, 05 Jun 2007 12:25:24 +0100, Ben Bacarisse
<be********@bsb.me.ukwrote:
Nick Keighley <ni******************@hotmail.comwrites:
<snip>
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. <snip>
Plus, most (other) typed 3GLs of the time -- FORTRAN, COBOL, PL/I --
had the list-of-ids then (list-of-)decls syntax. AFAIK only a68 then
had types-within-routine-decl -- and it allowed and arguably
encouraged complicated type specs that could rather frighten the
typical programmer, although not an experienced language implementer.
(Pascal and other Wirthians did so later. Don't know about JOVIAL.)

- formerly david.thompson1 || achar(64) || worldnet.att.net
Jul 1 '07 #13

This discussion thread is closed

Replies have been disabled for this discussion.