Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming

Bjarne Stroustrup Reflects On 25 Years of C++ 553

eldavojohn writes "Today roughly marks C++'s first release 25 years ago when about six years of Bjarne Stroustrop's life came to fruition in the now pervasive replacement language for C. It achieved ISO standardization in 1998 and its creator regularly receives accolades. Wired's short interview contains some nice anecdotes including 'If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it' and 'I'll just note that I consider the idea of one language, one programming tool, as the one and only best tool for everyone and for every problem infantile. If someone claims to have the perfect language he is either a fool or a salesman or both.' There's some surprising revelations in here, too, as his portable computer runs Windows."
This discussion has been archived. No new comments can be posted.

Bjarne Stroustrup Reflects On 25 Years of C++

Comments Filter:
  • Olde Saying (Score:5, Funny)

    by Anonymous Coward on Thursday October 14, 2010 @04:39PM (#33900174)


    C++ is to C as Lung Cancer is to Lung.

    Truer words have never been spoken.
    • Re:Olde Saying (Score:4, Insightful)

      by euyis ( 1521257 ) <euyis@infinity-game. c o m> on Friday October 15, 2010 @12:51AM (#33904700)
      I read this as: like cancer, C++'s stronger and much more powerful than its old host; taking all the nutrition and grows bigger and bigger at mindblowing speed; changes (mutates) quickly and spreads to everywhere expanding its influence. Unfortunately all these things come at the expense of C and other languages.
  • Reflect? (Score:5, Funny)

    by ciscoeng ( 411359 ) on Thursday October 14, 2010 @04:40PM (#33900182)

    No, no. You're thinking of C#!

    • Sometimes I hate being the kind of person who gets those jokes...

      You know, when you chuckle, and then the guy across the room asks, "What?". And you say "Oh, just a programming joke" and then you feel bad because it makes you sound smug about it but really you're just saving each other some time by not explaining something that they wouldn't get initially to finally resolve to a joke that wouldn't be so funny after you explain it.

      I almost made a try/catch 22 joke, but I think we can all agree those have bee

  • the best. (Score:4, Informative)

    by bhcompy ( 1877290 ) on Thursday October 14, 2010 @04:41PM (#33900198)
    My first language and I wish my only. I don't know if it is because it was my first, but it's the only one that I feel like can accomplish everything I need in a very logical and clean fashion. Java comes close because it feels close, but the extra layer of syntax pisses me off. Anyways, I remember the project in high school that I was working on when it clicked in my mind as a language I can read rather than a bunch of mumbojumbo that I had to try to interpret. Thank you, recursive merge sort project.
    • by kellyb9 ( 954229 )

      Thank you, recursive merge sort project.

      That's good and all but Bubble Sort FTW!

    • Re:the best. (Score:5, Interesting)

      by ledow ( 319597 ) on Thursday October 14, 2010 @04:54PM (#33900370) Homepage

      I grew up with C and various other languages (I actually learned Z80 assembler after BASIC but before anything else) and I was forced to do Java for university despite the fact that I never attended a single "Programming in Java" lecture for two years and just downloaded the coursework and submitted it online the same day.

      I can't stand C++, it's all but unreadable to me. I'm not saying that C is always readable but C++ makes it much easier to create a mess and jumping into any large C++ project is more an exercise in reading than doing (sometimes that can be a good thing, sometimes that just gets in the way of what should just be a simple fix). And in the end it's just a clever macro / preprocessor trick over C99 to turn various "objects" into sets of function pointers that get called at creation / destruction. I honestly find C++'s syntax quite hideous, and I always thought that Java did a slightly better job at it. The trouble with Java is, unfortunately, far too much verbosity for some very simple things.

      I wouldn't necessarily recommend C to a beginner either but if you're intent on starting down the C++ line, you do actually have to learn 99.9% of C before you ever really understand anything "C++" in a given program. Thus it's a nice *extension* to a language but I don't like it being classed as a language in itself. It is "C with classes", after all.

      It very much depends where you start, I suppose, but I'm loathe to recommend anyone to start with either C or C++ until they know they want to program and will enjoy doing it.

      • Re: (Score:3, Insightful)

        by Jorl17 ( 1716772 )
        I was thirteen when I learned how to program. I jumped right into C++ and never looked back. Only later did I dive deeper in the machine with Assembly. Learning Assembly was on par with learning C itself. For me, "C itself" are the lower-level components that C++ programmers can easily avoid. These days I pick C++ when I can, but I do just fine with C. I only miss templates and operator/function overloading, because I can create most of the rest given some time (even polymorphism can be done to a certain de
      • "but I'm loathe to recommend anyone to start with either C or C++"

        I see this said often, but I don't really agree with it. While it's great to know other programming languages, learning a completely different language for the sole purpose of getting used to programming in general instead of just learning the language you want to learn seems like a waste of time. Learning that other language probably isn't going to help you learn the syntax of the language you really want to learn. I tried learning other lan

        • Re:the best. (Score:5, Interesting)

          by ultranova ( 717540 ) on Thursday October 14, 2010 @05:54PM (#33901148)

          While it's great to know other programming languages, learning a completely different language for the sole purpose of getting used to programming in general instead of just learning the language you want to learn seems like a waste of time.

          If you're new to programming, start with line-number Basic. When you start inventing weird workarounds for the weaknesses of that language - namely, the lack of stack - graduate to C and the world of Block Programming. When that starts seeming small to you, graduate to C++/Java.

          The thing is, each and every programming paradigm has been invented to solve problems. You can't really understand it if you don't understand the problem(s) it was invented to solve, and those problems are really only apparent once you push the language to its limits and try make up your own ways to escape them.

          And hey, who knows, maybe you'll invent something better.

          • Re:the best. (Score:5, Insightful)

            by b4dc0d3r ( 1268512 ) on Thursday October 14, 2010 @08:09PM (#33902798)

            That's exactly how I learned, and probably a lot of the pro coders. I started with GW-Basic, turbo pascal, visual basic, then hit a wall. Why won't my crc-32 work quickly? Use a .dll in C. So I learned C, and had some polymorphic class type stuff happening.

            Then I decided to learn C++. Bloat I thought, but I basically used C syntax with a few C++ things like new. Then I had a reason to use polymorphism, and I have to say it made the code clean. I learned a lot by looking at various open source code bits, and there is a big difference between well-organized code and poorly organized. Without an intelligent IDE like MSVS 2005, where you can say "find definition" or "find references", C++ can be so poorly laid out that it's incomprehensible. But the compiler can figure it out.

            At the same time I learned C++, I also regressed into x86 assembly and some 6502 as well. Now, when I debug poor C# or SQL performance, people are amazed that I can figure out where the bottlenecks are without even profiling or running the app. Knowing the language helps, but knowing what the computer has to do under the hood is priceless. You don't know the exact algorithm, but you know enough. When you see something like SqlCommandBuilder that magically knows the insert or update or delete commands for each table, you have to be able to know not to use it if you need performance. IF that's not obvious then you should really go back to the basics and unlearn.

            Like when Java came out and everyone called it slow and bloated. Sure it was on some machines, but a lot of it was inefficient string concatenation. Using strings and putting them together instead of using StringBuilder or whatever it's called. Each append required allocation, copy, copy, and a free or two. The language could have helped clarify the intended usage, and examples could have been better, but lots of people don't learn the right way.

            I see way too many posts on forums when I'm searching for information on poorly documented language features that indicate people don't read a single book or have any formal study of the language. They just start copying things they see, and re-use it because it worked last time. And it's even worse now, there are snippets everywhere on how to do things and no explanation on why, or what not to do. If I ever get to be a hiring interviewer, I'm going to have some very basic questions, not a programming exercise. Things like give me an example where a struct would be a better choice and where a class would be better. And for advanced positions, how to write a polymorphic class in C. Top-tier would have to modify the behavior of a program, without having the source code. Replacing me would require doing it without altering the binary.

            In short, learn how the damned thing works and any language will be decent. More importantly, you can decide which one is most appropriate.

      • Basic, Z80 assembler and Java for university. I sense another 80s child in the room. Put down your copy of Devpac and back away from the keyboard slowly...

      • by AnonymousClown ( 1788472 ) on Thursday October 14, 2010 @05:19PM (#33900704)

        I can't stand C++, it's all but unreadable to me.

        That's because just about every C++ coder wants to be the guru (and maybe find the error that gets the $2 check from Bjarne - I actually saw one and the guy who got it framed it!) so, what do they do? Ever frick'in chance they get, they have to use some esoteric feature of the language in their development regardless if it's appropriate - I've done it too. For example, how many of you fellow C++ guys made a template class even though the class would only deal with one data type for ever and ever and ever? Or overloaded an operator just for the sake of overloading it - operator overloading back in my day was the most over used and abused feature in C++.

        When I got over the guru thing, I always tried to keep my code well documented and used features sparingly.

        For the record, templates can be awesome such as when using the STL - that saved so much grunt work!

      • Re:the best. (Score:5, Insightful)

        by martyw ( 1911748 ) on Thursday October 14, 2010 @05:42PM (#33901012)
        C++ is about freedom, features and performace. That is what makes it special and what matters in producion environments.

        Objective, generic, functional -- its all there and accompained with the best preprocessor, macros and code generators by leading Intel, Microsoft, AMD and even Apple C++ compilers, but again the most important thing is that nothing is really forced upon you. No "automatic memory manager" or other "nany" and "dumb things down" features that create artificial limits, slow execution, unpredictable behavious and most importantly do not restricts you to somebody's elses narrow minded coding practices.
        • Re: (Score:3, Insightful)

          by Fourier ( 60719 )

          Objective, generic, functional -- its all there and accompained with the best preprocessor, macros and code generators

          LOL

    • Re:the best. (Score:5, Interesting)

      by betterunixthanunix ( 980855 ) on Thursday October 14, 2010 @04:57PM (#33900408)
      C++ was my first language too, and until I started teaching it to other people, it was my favorite. Then I saw all the things that make no sense in C++, which never tripped me up because I happened to have been using the language for so long. I also noticed that a lot of idioms and design patterns that I used to think were really cool hacks were just ways to avoid serious design flaws in the language itself.

      What really killed C++ for me was when a student created a situation like this:

      std::string somefunction(){}

      The fact that such a thing can compile is a glaring error. A function that declares a return type should have a return statement in it, and that should be beyond question. In C, failing to actually return will cause you to have corrupt data; in C++, it can cause a crash, when a temporary object that was never created is destroyed (and happens to have a virtual destructor, which is common).

      It is true, there is no on right language, but on the flip side, there certainly are languages that should be avoided if possible, and I would say that C++ is one of them. I understand that there is a lot of legacy code and that using C++ is often unavoidable, and I have found myself in that situation, but if I were starting a new project with a fresh codebase, C++ would be pretty far down the list of languages that I would consider.

      • Re:the best. (Score:5, Informative)

        by The Moof ( 859402 ) on Thursday October 14, 2010 @05:16PM (#33900678)

        std::string somefunction(){}

        The fact that such a thing can compile is a glaring error.

        Here's something interesting: Visual Studio wouldn't compile it for me (error C4716, complains about no return value, as you had expected), but it compiled on my FreeBSD box without any complaints. Perhaps this is more of a compiler problem than a C++ problem.

        • Re: (Score:3, Informative)

          Actually, if you look at the standard, it is not defined. The standard says what a return statement does, and it was what a function declaration should mean, but it says nothing about functions that have a non-void return type being required to have a return statement in the function body. The fact that Visual C++ won't compile that code means that (1) Visual C++ implements a language that is not exactly C++ and (2) Visual C++ corrects an error in the C++ standard. On the other hand, g++ does not try to
          • Re:the best. (Score:4, Insightful)

            by Chris Burke ( 6130 ) on Thursday October 14, 2010 @05:27PM (#33900808) Homepage

            Uh g++ catches that error for me. Though on the other hand, I consider -Wall -Werror to be basically non-optional arguments.

            • Except that:
              1. The standard says nothing about warnings, only errors
              2. The fact that you asked g++ to consider warnings as errors means that you are asking g++ to only accept a subset of C++
              • Re: (Score:3, Insightful)

                by Chris Burke ( 6130 )

                Except what? It means g++ is essentially doing the same thing as Visual C++ -- fixing problems with the standard in logical ways. The subset of C++ where you can't have a non-void function not explicitly return anything is a good subset of C++.

                Obviously I'm taking it as given that the C++ standard has flaws. :)

          • Re:the best. (Score:4, Insightful)

            by Sancho ( 17056 ) * on Thursday October 14, 2010 @05:53PM (#33901146) Homepage

            The fact that Visual C++ won't compile that code means that (1) Visual C++ implements a language that is not exactly C++

            I don't understand. If the behavior is undefined, doesn't that mean that it's up to the compiler to decide what to do in those cases? That doesn't mean that VC++ implements a language that is not exactly C++, it means that it chose to throw an error when this particular undefined behavior occurs. A compiler which doesn't throw that error is still deciding how to handle behavior undefined by the standard.

          • Re:the best. (Score:5, Informative)

            by HonIsCool ( 720634 ) on Thursday October 14, 2010 @05:57PM (#33901192)

            What you are saying is not correct. The C++ standard says:

            "6.6.3 The return statement
            [...]
            A return statement without an expression can be used only in functions that do not return a value, that is, a function with the return type void, a constructor (12.1), or a destructor (12.4).
            [...]
            Flowing off the end of a function is equivalent to a return with no value; this results in undefined behavior in a value-returning function."

            It is perfectly legal for a compiler to issue a warning for this or even an error. I consider a compiler refusing to compile it a superior compiler.

        • I think I would be tempted to agree that this should be an error, not a warning, but if you use the -Wall flag it's caught.

      • Re:the best. (Score:4, Informative)

        by GreatBunzinni ( 642500 ) on Thursday October 14, 2010 @06:46PM (#33901834)

        C++ was my first language too, and until I started teaching it to other people, it was my favorite. Then I saw all the things that make no sense in C++, which never tripped me up because I happened to have been using the language for so long. I also noticed that a lot of idioms and design patterns that I used to think were really cool hacks were just ways to avoid serious design flaws in the language itself.

        What really killed C++ for me was when a student created a situation like this:

        std::string somefunction(){}

        The fact that such a thing can compile is a glaring error.

        If you had invested enough time to learn the language well enough to get to a position that you are competent enough to teach others how to use it then you would know that that is indeed a glaring error. For example, if you take the time to check out ISO IEC-14882 (i.e., the international standard which defines the C++ programming language) you will eventually stumble on section 6.6.3 - the return statement. In that section you can read the following definition:

        Flowing off the end of a function is equivalent to a return with no value; this results in undefined behavior in a value-returning function.

        If you also aren't familiar with the concept of "undefined behavior", then you can read up regarding that on section 1.3.12 - undefined behavior, where you can find the following quote:

        behavior, such as might arise upon use of an erroneous program construct or erroneous data, for which this International Standard imposes no requirements. Undefined behavior may also be expected when this International Standard omits the description of any explicit definition of behavior. [Note: permissible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or with-
        out the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message).

        So you see, what you tried to define as "not making sense in C++" is nothing more than ignorance of the language associated with the use of a compiler which fails to work well in this particular scenario. The standards may be a bit permissive in not declaring this to be illegal but the only parties dropping the ball are the ones in charge of specific compiler projects and/or ignorant users who fail to understand both this basic aspect and how to properly configure their compiler of choice.

      • Re:the best. (Score:5, Insightful)

        by Gadget_Guy ( 627405 ) * on Thursday October 14, 2010 @07:11PM (#33902122)

        What really killed C++ for me was when a student created a situation like this:

        std::string somefunction(){}

        After all that discussion about whether it really is a problem with the language specification, I have to say that this example is the lamest reason to damn an entire programming language. It is like damning staplers because they shoot staples into your face when you hold it backwards. Here's a tip: don't do that.

    • My first language and I wish my only. I don't know if it is because it was my first, but it's the only one that I feel like can accomplish everything I need in a very logical and clean fashion.

      I think its that way with everyone's first language.

      I just hate that my first language was VB, because after doing years of C++ and finally getting used to it, it comes back to haunt me when I'm the only one on the team comfortable enough with VB to go through the old VB6 code and figure out why Invoicer A can run functions that will break for Invoicer B.

      Well, I'm not the ONLY one who can, but once you get that label as "The guy who is better at it" all that stuff gets dumped on you. You know how it goes.

  • C++. lol. (Score:4, Insightful)

    by Anonymous Coward on Thursday October 14, 2010 @04:42PM (#33900202)

    And if anyone thinks C++ is the perfect language they're an idiot.

    • Re:C++. lol. (Score:5, Informative)

      by grub ( 11606 ) <slashdot@grub.net> on Thursday October 14, 2010 @04:44PM (#33900240) Homepage Journal

      I don't know why you were modded as a troll. FTA itself:

      Stroustrup: I'll just note that I consider the idea of one language, one programming tool, as the one and only best tool for everyone and for every problem infantile. If someone claims to have the perfect language he is either a fool or a salesman or both.
      • Stroustrup: I'll just note that I consider the idea of one language, one programming tool, as the one and only best tool for everyone and for every problem infantile. If someone claims to have the perfect language he is either a fool or a salesman or both.

        And that coming from the guy who created a multi-paradigm language.

        • Multi-paradigm does not imply "best tool for everyone and for every problem". I'd never write a quick text processor in C++, and I'd never write a kernel in Perl. But I might write a mixture of object-oriented, functional, and traditional procedural code in either one.

    • Re: (Score:2, Interesting)

      The parent is NOT a troll. As others have noted, BS says this himself.

      I find one of the most unfortunate things about C++ is that for years a large number of self-important people considered C++ to be the only language that *good programmers* know.

      I have sat for interviews that were in sum nothing but quizzes about the arcane features and misfeatures of C++. The interviewers thought that they were showing me that I didn't deserve to work with "geniuses".

      What they were really showing me is that I didn't want

  • by tverbeek ( 457094 ) on Thursday October 14, 2010 @04:44PM (#33900234) Homepage

    Only 25 years? When I was in college, we learned C. No "plus plus", no "objective", no "sharp"... just "C".

    Aye, as a matter of fact, I am feeling than a wee bit like Scotty in the TNG episode "Relics".

  • C++ inside (Score:3, Insightful)

    by Dan East ( 318230 ) on Thursday October 14, 2010 @04:49PM (#33900322) Journal

    I know he said it in jest, but the devices wouldn't have had any C++ in them at all. Only binaries, generated by assemblers, which took output from the C++ compiler. :) A couple layers of abstraction away is all...

  • Freedom (Score:5, Interesting)

    by FlawedLogic ( 1062848 ) on Thursday October 14, 2010 @04:57PM (#33900410)
    I've been writing C++ for 20 of those years and produced an awful lot of performance critical systems code in that time. To this day I find it the most liberating language, whatever is in your mind, you can express it, without the language compromising your intent. I can't see myself moving on until D becomes mainstream, and that may not be before I retire in ten years. I check out all the pretenders as they come and go, nothing else comes close.
    • by blair1q ( 305137 )

      performance critical

      Did you say "fast"?

    • Re: (Score:3, Insightful)

      by BravoZuluM ( 232200 )

      I have been writing with C++ for 20+ years as well. Started with cfront in 87.

      I'll second what Flawed Logic just said. I know and use other technologies as necessary, i.e. PHP for web development, Python for scripting...ect. But for embedded and desktop, C++ rocks. Use a framework like QT with the language and you can be every bit as productive as C#. When developers talk about all of the pitfalls of C++, it just tells me that they lack design principles and discipline. I learned object orient desig

  • by Lord Lode ( 1290856 ) on Thursday October 14, 2010 @04:59PM (#33900448)

    Yay, happy birthday, my favorite language :)

  • by Anonymous Coward on Thursday October 14, 2010 @04:59PM (#33900456)

    Sometimes, it is more important to have the right problem than the best solution.

    This is certainly true in more ways than he intended. C++ is as awful as it is useful: Extremely. I will remember this quote next time I have to make an implementation recommendation: "C++ is the right problem for this job." Fucking terrible syntax, loaded with gotchas, requires inordinate amount of expertise to avoid subtle errors--and utterly indispensable when a high-performance general purpose programming language is needed.

    • C++ is as awful as it is useful: Extremely.

      Ha! That's a pretty great quote there yourself Mr. AC.

    • by turgid ( 580780 ) on Thursday October 14, 2010 @05:17PM (#33900682) Journal

      My favourite quote: c++; /* this makes c bigger but returns the old value */

    • Re: (Score:3, Insightful)

      by shmlco ( 594907 )

      The "Why C++ sucks" author is an idiot.

      He states, "In Stroustrop's mind, making C++ compatible with C was instrumental, crucial to its success." And then tells you why it's a bad thing.

      But, as someone who actually lived through that time frame, I'm here to tell you that he misses the point completely. C++ compatibility was in fact instrumental to it's success.

      Why? Because C++ was originally a preprocessor that converted everything to C, and then fed the C code to the C compiler. And almost EVERY platform ha

  • by shutdown -p now ( 807394 ) on Thursday October 14, 2010 @05:01PM (#33900496) Journal

    C++ - the language which everyone loves to hate. Every time there is a story posted about it on /. (or any other technical forum), you see all kinds of posts ranting about how crappy it is, how Objective-C (or whatever is the fad of the day) is so much better etc.

    And yet - it is still the language in which most desktop software and games are written to this day, and this doesn't show the signs of changing. Not only that, but some of the biggest and most prominent FOSS projects - Firefox, OpenOffice, KDE - are written in it.

    Ever wondered why?

    • by betterunixthanunix ( 980855 ) on Thursday October 14, 2010 @05:09PM (#33900568)
      C++ is popular for the same reason Windows is popular (and in fact, Windows' popularity probably fuels a lot of the popularity of C++): it is widely deployed, people know it, and there is a lot of legacy code that depends on it. Popularity does not make a language good, and I think we have enough examples: COBOL, FORTRAN, C++, etc. C++ has a number of glaring omissions from the standard, and worse yet, things in the standard that are now idiomatically avoided (see Effective C++ and Effective STL if you are interested -- auto_ptr certainly comes to mind). There are some really great languages out there, which just don't have the same non-technical advantages that C++ enjoys, and therefore never became popular among mainstream programmers.
      • Re: (Score:3, Insightful)

        by pyrrho ( 167252 )

        actually, it's because if you know what you are doing you can make it run as fast as C, and access the hardware as easily as free, and also, if you know what you're doing you can make higher level and more flexible abstractions.

        people seem to have an objection to the "know what you are doing" requirement, and seem to think that in C, you don't have to know and the code manifests well. If there is any truth to that... that C code is all nicely organized now, and naturally safe, then it's only because the C

    • Re: (Score:3, Insightful)

      by Abcd1234 ( 188840 )

      Ever wondered why?

      Tradition, momentum, and the fact that it occupies a very specific niche (large, low-level, high-performance applications). But taken on its own, you could do far far better than C++.

      Hell, by your logic, Windows must be the greatest operating system in the history of computing.

    • Re: (Score:2, Insightful)

      by Anonymous Coward
      Ever wondered why, at one point, Full House was the longest running active sitcom on TV? Was it its high quality?

      C++ is the lowest common denominator language, and hence its entrenchment. Large companies, especially, are prone to entrenchment. For the first few years of OS X, Apple's devs all worked on C++ (i.e., Carbon) versions of the APIs before they worked on their Objective-C counterparts because both the Apple devs and outside companies were stuck in the era of C++. Even as they pushed Objective-C
    • Re: (Score:3, Insightful)

      by lennier ( 44736 )

      And yet - it is still the language in which most desktop software and games are written to this day, and this doesn't show the signs of changing. Not only that, but some of the biggest and most prominent FOSS projects - Firefox, OpenOffice, KDE - are written in it.

      Ever wondered why?

      Completely coincidentally, the set of software (both FOSS and commercial) written in C++ seems to overlap closely with the set of software for which large and prominent security flaws are discovered every month.

      Ever wonder why that is?

    • Re: (Score:3, Funny)

      by sjames ( 1099 )

      But keep in mind the joke "Eat shit! A trillion flies can't be wrong!"

  • Doom (Score:5, Informative)

    by Purity Of Essence ( 1007601 ) on Thursday October 14, 2010 @05:03PM (#33900514)

    So, for me, the main satisfaction comes from interesting and challenging applications that just might not have been done without C++, or possibly been delayed for many years for lack of a language suitable for demanding real-world applications. ... Videogames like Doom

    Doom was written in C, not C++.

  • Videogames like Doom, ...

    Correct me if I am wrong, but I am pretty sure the first Doom was written in C [wikipedia.org].

  • by Megaweapon ( 25185 ) on Thursday October 14, 2010 @05:04PM (#33900530) Homepage

    trollface.jpg

  • by RocketRabbit ( 830691 ) on Thursday October 14, 2010 @05:06PM (#33900546)

    Alan Kay said "Actually I made up the term "object-oriented", and I can tell you I did not have C++ in mind."

    C++ seems like an awful stopgap solution that got out of control.

    • Re: (Score:3, Funny)

      by russotto ( 537200 )

      C++ seems like an awful stopgap solution that got out of control.

      Yeah. And then they added templates.

  • So that's exaggerating a bit, but even if I enjoyed writing some C++ programs, I still find it hard to dive into C++ source code and understanding what it does.

    For example... If you're reading a piece of C code and see a function call, you can find the function definition with a simple textual search. With C++ you have to look at the argument types (due to function overloading), you have to check what the object type due to derived classes, etc. What a mess it is just to find out precisely what code is behi

  • That statement works as both a positive idea and as a negative one.

    The positive being the more capable you are the more time you put in.

    The negative being the trend towards techno dogmatism among programmers.

    Programmers tend to be afraid of technology they are not used to, so everything that isn't their core thing tends to be labeled as "crap".

    I would love to learn more languages........time!

  • by 91degrees ( 207121 ) on Thursday October 14, 2010 @05:15PM (#33900662) Journal
    I think I'd actually like the language if it didn't try to do so much.

    Adding classes to C was great. Operator overloads are really useful, virtual functions mean you can frequently avoid C's rather cryptic function pointer syntax. There are so many clever tricks you can do with scoping that makes C++ extremely useful.

    After that things start to get a bit nasty. Template programming seems like such a nice idea, but it's so cryptic, and totally unreadable - and why use the triangular brackets!? . The syntax to differentiate pre and post increment seems completely arbitrary, and the headaches caused by multiple inheritance and default parameters make me wonder if they're really worth the trouble. The try/catch construct is also useful but it feels so unwieldy.
  • by Black Art ( 3335 ) on Thursday October 14, 2010 @05:21PM (#33900734)

    Does Bjarne Stroustrop think of women as objects?

  • by gmurray ( 927668 )
    I do believe that anyone that claims to actually like working with C or C++ is either

    1) Unfamiliar with any languages that don't let you shoot yourself in the face so easily.
    2) More like a machine than a man.
    3) Trying to show off his "hacking skillz".
    4) Being overly nostalgic.
    5) Hasn't actually used C or C++ in about a decade.


    IMHO using C or C++ when not necessary displays a depressing amount of machismo and masochism. Why do it to yourself?
  • First there was the "red" album: straightforward rock-n-roll with some interesting wordplay, but with only a few general themes. C++ was the same way: create some objects, work with 'em, pass 'em around. All good.

    Then C++ discovered acid and got into its "blue album" phase: multiple inheritance, templates, operator overloading, namespaces. To read C++ now is like listening to the later Beatles: obtuse, baffling, with a fair amount of brilliance that makes you wonder "how did they do that?????" It confirms t

  • by Dystopian Rebel ( 714995 ) * on Thursday October 14, 2010 @05:39PM (#33900954) Journal

    TFS: "There's some surprising revelations in here, too, as his portable computer runs Windows"

    Very well, I am a long-time supporter of FOSS too, but I'll feed your troll: How is BS's use of M-Windows a surprise?

    Is it because M-Windows has bad C++ development tools?

    Is it because M-Windows is not the dominate OS?

    Is it because C++ should only be used in FOSS?

    Is it because BS should share your opinions or be damned?

    • by Senjutsu ( 614542 ) on Thursday October 14, 2010 @09:36PM (#33903570)
      It's because Bjarne Stroustrup spent 23 years at Bell Labs, and ran the Large-Scale Programming Research Department there.

      Bell Labs was the birth-place of Unix, and was always Unix central. Anyone even cursorily familiar with these facts would be a bit surprised to see someone who was so close to such a Unix stronghold for so long running a non-POSIX compatible system for day-to-day use.
  • by RzUpAnmsCwrds ( 262647 ) on Thursday October 14, 2010 @05:45PM (#33901048)

    C++ is successful for one big reason: it provides most of the advantages of C with the conveniences of an object-oriented language. Performance is excellent (close to C, which with a good compiler is close to hand-written assembly in most cases) and there's enough capability that you can write just about anything in it, including things that you would never consider writing in manged languages (like device drivers or the VM for those managed languages).

    The problem is that the developers of C++ have trouble saying "no". There are a bunch of C++ features that aren't really necessary, but that exist either out of legacy or because someone thought it would be a good idea.

    Look at Google's C++ style guide: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Inheritance [googlecode.com]

    Like most users of C++, Google uses a severely restricted subset of the language. The thing is, most of what Google has left out is quite frankly unnecessary for 99.9% of C++ users. But we're all stuck with it anyway.

    Once you get past some of the C-legacy anachronisms and restrict C++ to a small subset of its functionality, it's actually a nice language. The problem is that we can't take things out at this point.

  • Ada Programming (Score:3, Insightful)

    by Ada_Rules ( 260218 ) on Thursday October 14, 2010 @06:26PM (#33901624) Homepage Journal
    There certainly is no perfect language but I find any programmer that really spends time learning Ada, or Python or other language really well ends up being a better C++ programmer in the end too. Brief interludes don't really cut it either.
  • by blunte ( 183182 ) on Thursday October 14, 2010 @06:39PM (#33901768)

    I won't bother speculating why C++ became dominant (any more than I feel like rehashing VHS vs BetaMax), but I will say this: any language that needs a series of books explaining how NOT to use the language (lest you create obscure bugs) is an inherently flawed language.

    With assembly there's an excuse - you have no boundaries (no pun intended). You realize you're operating on bare metal, or at least one step above it. But with C++ you have this belief that you have the illusion of power and safety, but the reality is you have a jumble of constructs and tools that can easily be used wrong (and often are by novices and intermediate developers).

    I daresay you could teach an intermediate coder how to do OO in straight C and get better results than if they were trying to use C++.

    And yeah, I'm in the camp of "Obj-C is better than C++". But then, I like Ruby, Lisp, Clojure, and Scala too. C++ really needs to die. Any further energy spent on C++ needs instead to be put into JVM and other abstraction technologies.

  • by krisamico ( 452786 ) on Thursday October 14, 2010 @07:40PM (#33902446)

    Bjarne and the Community's creation was the bona fide beginning of my career. When I started, I thought I was a 7 in C++. Several years later, I was a 5. I wrote my best and worst code in the language, over 15 years, and I am still running into issues in the language that challenge me today. C++ helped me learn a lot about myself along the way, and I am grateful to Bjarne and the Community at large for that. A good article and interview, if not a tad brief.

  • by brsmith4 ( 567390 ) <brsmith4@gmail. c o m> on Thursday October 14, 2010 @09:37PM (#33903586)

    Bjarne Stroustrup Reflects On 25 Years of C++: My bad

"What man has done, man can aspire to do." -- Jerry Pournelle, about space flight

Working...