History of The C++ Programming Language

This is a discussion on History of The C++ Programming Language within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I have spent nearly 6 hours on writing the introduction and a second article for my blog today. It is ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    8

    History of The C++ Programming Language

    I have spent nearly 6 hours on writing the introduction and a second article for my blog today. It is now 3:57am PST, and I am ready to go to bed.

    This is for those who need to brush up on the history of C++, or who have a minute or two to read about how it all started. I hope you find my writing style interesting and the information insightful. The target audience for these articles is a beginner programmer, however the purpose of these articles is to educate people of any background or skill level.

    http://www.authenticsociety.com/blog/C_plusplus_History

    I would really appreciate feedback on this, corrections, suggestions and whether anyone would like to see any more of these tutorials.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,602
    Moved to General Discussions.

    EDIT:
    Quote Originally Posted by gregsometimes
    The target audience for these articles is a beginner programmer, however the purpose of these articles is to educate people of any background or skill level.
    I think that it would be better to refer a beginner to a full blown OOP tutorial instead of trying to cover its basics with nearly a third of an article that is supposed to be about history. Even the basics that you did try to cover does not include inheritance and polymorphism. Stroustrup himself stated that "C++ is a multi-paradigm programming language", so your essay probably should go beyond the object oriented aspects of C++ when recounting its history.

    Quote Originally Posted by gregsometimes
    In C, for example, you may create variables and structures for each part of the car and write functions that modify values of those variables and structures in different situations. But doing this has one big challenge. You would need to come up with your own non-traditional and subjective ways of breaking the problem down into a set of smaller problems. Which would be then easier to organize and think about separately. Using objects you can effectively do just that in a traditional and standardized fashion.
    You make it seem as if breaking down a problem in C++ is automatic and follows some prescribed set of rules that have no exceptions. In truth, class design in C++ can be subjective because there may be trade-offs that have to be made.
    Last edited by laserlight; 01-04-2009 at 05:53 AM.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    8
    Well this depends on interpretation. I am already familiar with what you are saying, but perhaps it would make things a little more clear if I added that this article is part of the introduction to a set of tutorials that will be added to the website as I write them.

    The second quote commentary that you made is correct, but I am not talking about that context. I am saying that Using objects you can do the same thing you would be able to do in C, in a well-established manner. There, I am saying that C does not support object-oriented programming techniques, even though it is quite possible to imitate OOP in C.

    I write these articles late at night, and they are not perfect.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by gregsometimes View Post
    Well this depends on interpretation. I am already familiar with what you are saying, but perhaps it would make things a little more clear if I added that this article is part of the introduction to a set of tutorials that will be added to the website as I write them.

    The second quote commentary that you made is correct, but I am not talking about that context. I am saying that Using objects you can do the same thing you would be able to do in C, in a well-established manner. There, I am saying that C does not support object-oriented programming techniques, even though it is quite possible to imitate OOP in C.

    I write these articles late at night, and they are not perfect.
    No its not open to interpretation. Class design in C++ is subjective, the very fact that it can be approached from more than one direction (your statement that it depends on interpretation) inherently requires it to be so. Either you can impliment classes in more than one way, or you cant, it cannot be both ways. The fact is there are many many different ways to impliment classes. If you put 3 programmers in a room and ask them how to impliment a particular class, you will get 5 answers.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,602
    Quote Originally Posted by gregsometimes
    The second quote commentary that you made is correct, but I am not talking about that context. I am saying that Using objects you can do the same thing you would be able to do in C, in a well-established manner. There, I am saying that C does not support object-oriented programming techniques, even though it is quite possible to imitate OOP in C.
    I gather that your main point is that C does not natively support object oriented programming. The thing is, your explanation and example does not support the claim since the notion of OOP at that point is limited to simple object modeling, which is natively supported in C by structures and functions.

    Take the car example: anyone with a working knowledge of C can model a car with engine and wheels in C. It is not clear how that is "non-traditional". It is clear that the exact model is subjective, but the same goes for C++. The more "non-traditional" aspects of such object modeling come into play when one wants to simulate inheritance and polymorphism in C, but as these concepts were not mentioned it seems as if C++ provides nothing in the OOP department over C.

    Quote Originally Posted by abachler
    No its not open to interpretation.
    I think the part about interpretation has to do with interpreting the purpose of the essay, i.e., in response to the first part of my own response.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    But C++ has a number of other features, as well, that the article failed to mention.
    If it only supported OOP, then it would not be multi-paradigm, yes?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    Jan 2009
    Posts
    8
    I would agree, that the structure of the sentences in the advertised article is not ideal. In that particular part of the tutorial. The paragraph will need to be fixed. And I appreciate that some of you noticed that not all information fit into the context of the title of my article.

    I am not arguing any of what you are saying, I am sure Elysia, with her 11,368 forum posts is an experienced C++ programmer, as well as laserlight from Singapore (some of the best programming minds are in Europe unfortunately).

    abachler, it is the text of my poorly written article is open to interpretation. I did not mean to express with that article, what you are arguing. You are right, the usages of classes in C++ is subjective. C++ is a language written to support many different styles of programming, but I think you and I both know that. It was simply bad article writing on my part. laserlight has pointed it out too, she's right.

    I finished the article late at night, and I wanted other people to review it. Your input will be taken seriously, and I will update the article given the information you have contributed.

    Thanks!
    Last edited by gregsometimes; 01-06-2009 at 02:16 AM. Reason: Missed a word in first sentence, first paragraph. Misspelled the word unfortunately in the second paragraph, first sentence.

  8. #8
    Registered User
    Join Date
    Jan 2009
    Posts
    8
    I noticed something else.

    laserlight,
    I re-read what you said in your post. Quote:

    I gather that your main point is that C does not natively support object oriented programming. The thing is, your explanation and example does not support the claim since the notion of OOP at that point is limited to simple object modeling, which is natively supported in C by structures and functions.

    That's is correct - I am saying that C does not "natively" support Object-Oriented programming. C enables it, but it does not support it. C++ does support object-oriented programming. And believing otherwise, or teaching anyone otherwise is making a big mistake. Javascript, too enables object-oriented programming (inheritance, object composition, etc), but it does not support it.

    In Bjarne Stroustrup's words:

    Object-oriented programming is a technique for programming - a paradigm for writing "good" programs for a set of programs. If the term object-oriented programming language means anything, it must mean a programming language that provides mechanisms that support the object-oriented style of programming well.
    There is an important distinction here. A language is said to support a style of programming if it provides facilities that make it convenient (reasonably easy, safe, and efficient) to use that style. A language does not support a technique if it takes exceptional effort or skill to write such programs; it merely enables the technique to be used. For example, you can write structured programs in Fortran77 and object-oriented programs in C, but it is unnecessarily hard to do so because these languages do not directly (or natively, if you will) support those techniques.


    -- This is why I consider that criticism invalid.
    Last edited by gregsometimes; 01-06-2009 at 02:17 AM.

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,602
    Quote Originally Posted by gregsometimes
    This is why I consider that criticism invalid.
    However, Stroustrup has stated on the record that "object-oriented programming is a style of programming originating with Simula (about 40 years ago!) relying of encapsulation, inheritance, and polymorphism". A beginner reading your essay would be completely unaware of the importance of inheritance and polymorphism in OOP (and have only a vague notion of encapsulation, but I think that that is fine given the actual topic at hand). This is why I say that the notion of OOP at that point is limited to simple object modeling. C does natively support this subset of OOP.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I don't think the origin of C++ was "C is a bad language for large programs", as you seem to indicate here:
    n the coming two years after C was released, the code written in C began to suffer from a problem. As the programmers harnessed the power of Personal Computer, the software grew more complex, and the C programs have gotten longer and longer. This meant that these programs were also harder to maintain. Some functions needed to communicate with other functions, but there was no standard way of thinking about data organization. In long programs, the code was practically infested with functions in the global scope. One of the few ways to separate data was by using separate C header (.h) and C source (.c) files. Other than that, the language's features that would help organize the code to ensure readability of large programs were simply missing.

    There had to be a solution. In 1983, Bjarne Stroustrup developed such a solution, and named it the C++ programming language. He drew inspiration from some of the previous languages that did no suffer the obvious side-effects of C. One of those languages was Simula67. The greatest addition to C's supset, the C++ language, was that C++ introduced programmers to the concept of an object. An object is an abstraction of a problem. Not only does the use of the concept of objects in a programming language reduce the size of the program, it also makes the program much more readable and compact.
    The original REASON for C++ as it looks today was, as far as I understand it, that Bjarne had written a fairly large simulation project in Simula-67 [an object oriented language, and as the name indicates, meant for writing simulations in]. When testing this code with small models of the simulation was working just great. When it came to doing the actual simulation of the REAL work, it ran very slow. Some investigation turned up that 80% of the time was spent in the garbage collection, and only 20% of the computing time was actually spent on the simulation. This made the whole project unworkable.

    So to solve this problem, Bjarne decided to make a pre-processor to C that would (sort of) take the Simula object structure, and make it into C-code. This pre-processor later became the first C++ compiler, CFront.

    Sure, C++ solves some of the problems with large programs (and creates a few new ones, but nothing is ever perfect). And whilst it may be part of why it is popular today, it was certainly not the reason for it being invented in the first place.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #11
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,538
    I believe it should be noted that part of C++'s existence today is due to the lacking functionality in C.
    Actually, I like that paragraph since it puts C at a disadvantage and C++ on an advantage
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    But it's not exactly true. The existence of C++ is due to the lack of speed in Simula-67 - Stroustrup then based his own object-oriented language off C because it was fast.
    (Of course, if C had had object-oriented features, Stroustrup wouldn't have created C with Classes, but that's not the main causality.)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #13
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by CornedBee View Post
    But it's not exactly true. The existence of C++ is due to the lack of speed in Simula-67 - Stroustrup then based his own object-oriented language off C because it was fast.
    (Of course, if C had had object-oriented features, Stroustrup wouldn't have created C with Classes, but that's not the main causality.)
    Yes, one could perhaps say that C++ became POPULAR (and AT&T spent money on Bjarne's development of the language) because C had deficiencies that C++ solved - but certainly it wasn't what instigated the C++ language - it was a direct need for "something that is significantly faster than Simula for large amounts of "live objects" and has classes like Simula".

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  14. #14
    Registered User
    Join Date
    Jan 2009
    Posts
    8
    Thanks for everyone's insights and thoughts! I have edited the article judging by the feedback I received from everyone in this thread. I made conscious decisions. The following is a list of choices I made about every criticism that I have received.

    laserlight: I think that it would be better to refer a beginner to a full blown OOP tutorial instead of trying to cover its basics with nearly a third of an article that is supposed to be about history. Even the basics that you did try to cover does not include inheritance and polymorphism.
    Well, I decided to write multiple articles about C++. This article in particular is not designed to educate the reader about all details of object-oriented programming. I decided to explain advanced subjects in the following tutorials and leave this article as an introduction. A "full blown" tutorial will be written in the near future.

    laserlight:You make it seem as if breaking down a problem in C++ is automatic and follows some prescribed set of rules that have no exceptions. In truth, class design in C++ can be subjective because there may be trade-offs that have to be made.
    I agree the sentence structure and meaning flow may mislead a beginner. I will edit that part and restructure sentences and logic to make it more clear what it is that I am trying to explain.

    laserlight: I gather that your main point is that C does not natively support object oriented programming. The thing is, your explanation and example does not support the claim since the notion of OOP at that point is limited to simple object modeling, which is natively supported in C by structures and functions.
    I am a little confused about what you mean by the phrase "natively supports". Could you collaborate? The way I learned this from a Stroustrup's book (The C++ Programming Language)... he basically says that if the language makes it easy to implement a feature it can be said that, that language supports that feature, and vice versa. He clearly makes the distinctionthat C does not support OOP, however, it does [i]enable[/] it. I couldn't have said that better myself. Is it possible to write code in C that makes sense OOP-wise? It is, but the language was not written specifically to support OOP techniques, and so, it is more difficult to write OO programs in C than in C++. Is it possible to write Object Oriented code in Javascript? It is, but in the same way Javascript does not support OO programming, it merely enables it.

    laserlight: Take the car example: anyone with a working knowledge of C can model a car with engine and wheels in C. It is not clear how that is "non-traditional". It is clear that the exact model is subjective, but the same goes for C++. The more "non-traditional" aspects of such object modeling come into play when one wants to simulate inheritance and polymorphism in C, but as these concepts were not mentioned it seems as if C++ provides nothing in the OOP department over C.
    I agree, I don't explain it correctly in that part, wrote it in a hurry at 3AM.

    Elysia: But C++ has a number of other features, as well, that the article failed to mention.
    If it only supported OOP, then it would not be multi-paradigm, yes?
    Well, again, the article is part of an introduction and a brief outline of the capabilities of C++. In my opinion it's not a good idea to overwhelm an absolute beginner with advanced subjects. I just wanted to keep the focus of the article on the fact that C++ makes it easy to build object-oriented programs, and that it is an easier to use tool for OO programming. Thanks for pointing that out though.

    laserlight: However, Stroustrup has stated on the record that "object-oriented programming is a style of programming originating with Simula (about 40 years ago!) relying of encapsulation, inheritance, and polymorphism". A beginner reading your essay would be completely unaware of the importance of inheritance and polymorphism in OOP (and have only a vague notion of encapsulation, but I think that that is fine given the actual topic at hand). This is why I say that the notion of OOP at that point is limited to simple object modeling. C does natively support this subset of OOP.
    I figured out how to solve this problem. I need to mention that there is much more to OOP, but also say that it will be the subject of the following tutorials, but the concept of an object (or a class) is a good place to start.

    --- --- --- --- ---

    Elysia, CornedBee, matsp:

    Now for the reason C++ was invented, first of all thanks for your insights about this. I will dedicate a paragraph or two that explains the reasons C++ was created. So far, from my research and this discussion, it can be said that:

    1.) Bjarne devised back in 1979, because he faced a software engineering problem at the time where all currently available tools seemed inappropriate. This highly real world oriented design attitude was kept throughout the evolution of C++ - Bjarne specifically didn't want to produce an 'academic' language. [Source: comment on amazon, on the book The Design and Evolution of C++(C++ Design Evolution, by Bjarne Stroustrup )]

    2.) Bjarne stresses the point that C++ was designed from the beginning to be a 'multiple paradigm' language. [Source: same reference as 1.)]

    3.) Object oriented programming was never meant to be, and is not, the only valid - holy grail - style of programming, that many make it out to be. [Source: same reference as 1.)]

    4.) As quoted from the book, one of the design goals: 'C++ is a general-purpose language designed to make programming more enjoyable for the serious programmer' [Source: same reference as 1.)]

    I will edit the text of that article according to this information. Thanks all!
    Last edited by gregsometimes; 01-07-2009 at 10:31 PM.

  15. #15
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,602
    Quote Originally Posted by gregsometimes
    I am a little confused about what you mean by the phrase "natively supports".
    You already understand it correctly, as shown by your post #8.

    Quote Originally Posted by gregsometimes
    The way I learned this from a Stroustrup's book (The C++ Programming Language)... he basically says that if the language makes it easy to implement a feature it can be said that, that language supports that feature, and vice versa. He clearly makes the distinctionthat C does not support OOP, however, it does [i]enable[/] it.
    The crux of my argument has less to do with C not supporting OOP but with C supporting the subset of OOP described in your essay. Once you make it clear that there is more to OOP that what you mentioned, a beginner to C++ and OOP who has dabbled in C would understand more clearly that C++ does offer something extra with respect to OOP.

    Quote Originally Posted by gregsometimes
    Now for the reason C++ was invented, first of all thanks for your insights about this. I will dedicate a paragraph or two that explains the reasons C++ was created. So far, from my research and this discussion, it can be said that:
    Incidentally, Stroustrup's answer to the FAQ: When was C++ invented? includes a link to a PDF version of his essay A History of C++: 1979-1991. That material might be useful for cross referencing.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What language did they make Java in?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 17
    Last Post: 07-03-2005, 04:18 PM
  2. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 01:40 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. Language of choice after C++
    By gandalf_bar in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 06-15-2004, 01:20 AM
  5. Language History
    By Cgawd in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-08-2002, 02:22 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21