Results 1 to 12 of 12

Thread: A History of C++ in Brief

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140

    A History of C++ in Brief

    So someone just asked me about this, and I figured since I just typed all this out in an email, I could fill the rest of my boredom with posting it here. If someone is so motivated they could look up names and dates and flesh this out (the Jargon File would make a good start). Anyway, some of you may know this, others may not care, but I was asked...

    I've heard of C and C++, is there a C+?

    Nope, we skipped it. C++ looks more abstract and confusing to the layman.

    Honestly, there never was a C+ and this is why...

    It started with a language called CPL. I think CPL simply stood for Computer Programming Language. Not very creative, but to the point. Next came a variant of CPL called BCPL. Here I believe the B was for Basic.

    I'm sure CPL went on to spawn other variations, but BCPL spawned a next generation. It was an improvment on BCPL, not merely a variant, but it was far enough removed from CPL that it should get a unique name.

    B. And there is no need for it to actually stand for anything, we will simply drop the CPL and call it B. I'm sure someone asked, "is there a language called A?"

    Anyway, we now have B, and I'm sure you can see how the next generation of B can easily be named C. Now it is time to morn the lost ancestor A.

    C was the increment of B. It was the next in line. The name is no big surprise. And if the writer of C had written the next generation, it is very likely it would've been called D. As it turns out, he didn't bother.

    The guy who wrote the next generation thought he had a sense of humor. Instead of merely naming the next language D, which is C's increment, he figured he would name the next language C's increment. C++ introduced an increment operator: ++.

    In C, if you wanted to add 1 to something (increment it) you had to say, "Add 1 to this variable and store the result back into the same variable". 'Course, you type this instead: x = x + 1;.

    The writer of C++ introduced a short hand for that statement, the increment operator. Now you could quickly write: x++;.

    He also introduced a decrement operator (--) and several fancy assignment operators (like +=).

    'Course, there are odd things. C++ returns C and then adds 1 to it. ++C adds 1 to C and then returns C. But no one wants to use a language called ++C.

    Anyway, that's the letter I sent out. If there is something historicaly inaccurate, well, he won't care. I'm sure no one else will either, but feel free to correct me.

    Oh, also, the writer of C++ had a press conference or something a while back talking about plans to release a new generation of C++. Microsoft has already release Visual C++ and are working on C#. The C syntax is a very handsome one as far as I'm concerned. And it shows up again and again: CSH and TCSH (no surprise there), Perl (which was written in C/C++), Java (which was written by a bunch of people who knew C++), JavaScript (which was written to look a lot like Java).
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  2. #2
    Jethro
    Guest

    Hey thanks for that Ciber....

    ...but you didn't mention that Ritchie guy. Just being picky.

  3. #3
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I posted a thread in the C++ forums relating to the possible new version of C++ in the C/C++ forums sometime around a week ago.

    As a point of pedantry, Visual C++ isn't Microsoft's version of the language, it's their integrated development environment and compiler. I'm not sure if JavaScript was written to look like Java either, more likely it was written to look like C syntax. JavaScript was originally named LiveScript, before Java became popular and the name was changed.

    Is Perl really C-style syntax? I've looked at it before and been horrified at the looks of the code, and I'm a C++ programmer more than VB nowadays. I'd rather learn Befunge.
    Harry.

    "From one thing, know ten thousand things."

  4. #4
    Jethro
    Guest
    Is it true that MS are going to can Visual C++? Or is this some insane myth from the Apple Sites, (l think l got it from there somewhere)

  5. #5
    Addicted Member cyberwarpy's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    200

    Wink Re: A History of C++ in Brief

    So why are Java apps considered to much more powerful/speedier than apps that are written in C/C++... I read this in a Linux magazine...

    Originally posted by CiberTHuG
    Java (which was written by a bunch of people who knew C++), JavaScript (which was written to look a lot like Java)

  6. #6
    Addicted Member cyberwarpy's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    200
    I actually heard on some thread in VB General forum that M$ VB is going to replace VC++... ROFL

    Originally posted by Jethro
    Is it true that MS are going to can Visual C++? Or is this some insane myth from the Apple Sites, (l think l got it from there somewhere)

  7. #7
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    So why are Java apps considered to much more powerful/speedier than apps that are written in C/C++...
    In general this is not the case at all, C/C++ code is very low-level and almost always faster than equivalent Java code running on a JVM. There are some cases in which JIT Java compilers will now allow Java code to outperform the C/C++ equivalent due to dynamic optimisations that only an environmentally-aware compiler can make. However, these cases are rare and are heavily dependent on a low number of method calls. Invoking functions in Java has a very high overhead.
    Harry.

    "From one thing, know ten thousand things."

  8. #8
    Hyperactive Member Emo's Avatar
    Join Date
    Jul 2000
    Posts
    428

    Arrow

    I have the book "C++ Programming Language" by Bjarne Stroustrup (the creator of C++) 3rd Edition. In the introduction, he says that they didn't name it C+ because it's a syntax error, so they simply added a +, that's why it's C++

    P.S. The bad thing is that I'm a beginner in C++ and this book is considered for advanced users so I really have no use of it, until I'm quite good with C++.

    -Emo
    -=VB6 Enterprise Edition=-
    -=VC++6Enterprise Edition=-
    «¤E³m°O²™¤»

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Exactly, Emo.

    You are right about JavaScript. It was probably modeled on the C/C++ syntax, which made it that much easier for Netscape to change the name at the eleventh hour and ride on Sun's Java's coat tales.

    I disagree about VC++. I do consider it a seperate language. Microsoft added a lot of extentions, mostly compiler directives, but they've added enough. The differences between VC++ and C++ is almost as big as C++ to C.

    Yes, Microsoft is dropping VC++ (to some degree) in favor of C# and .NET. It is Microsoft's tendancy to re-invent everything instead of looking for a standard and improving the standard. I won't go into why that is.

    Yes, Perl is in a C style, though it has differences, its variables being the most obvious.

    I didn't mention anybody, much less Ritche.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  10. #10
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Maybe you can say that Visual C++ compiles a version of C++ that is very different to ANSI C++, you might even consider it a different language (although I think that's really stretching a point), but 'Visual C++' is just the IDE and compiler.

    You basically got the JavaScript story exactly right though, that's what happened.
    Harry.

    "From one thing, know ten thousand things."

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    All compilers have their own extensions, and in many cases you don't have to use them. The Visual C++ compiler can be set to disable all extensions and use ANSI rules.

    And before you mention #pragma, that's supposed to be there for anything compiler-dependent.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  12. #12
    Jethro
    Guest
    Originally posted by Emo
    P.S. The bad thing is that I'm a beginner in C++ and this book is considered for advanced users so I really have no use of it, until I'm quite good with C++.

    -Emo
    Know the feeling and have been lumped with a fairly major C++ project

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width