back to article Stroustrup and Sutter: C++ to run and run

For the second year in a row organizers at the Software Development Conference & Expo West felt the super sessions hosted by C++ legends Bjarne Stroustrup and Herb Sutter were worth some ink on the event agenda. "There was a time in the late 1990s and early 2000s when they simply stopped advertising C++ sessions at this …

COMMENTS

This topic is closed for new posts.
  1. Anonymous Coward
    Anonymous Coward

    High-energy physics

    It might be worth mentioning that in addition to proper coders using C++, there is now a (relatively) huge group of other people who use the language regularly: high-energy physicists. As far as I know C++ has been used in the field for over 12 years, ever since the NA49 experiment at CERN decided to use it instead of Fortran as the base for its data analysis framework, and is now a de facto standard, having already reached the point where all major tools used in the field either have been or are being re-written in C++. Not bad, huh.

  2. Graham Dresch

    As somebody who grew up with assembler, I wish...

    C++ and the whole ghastly OO methods that grew from it had never been invented.

    Assembler - small, fast, efficient and difficult.

    Algol60, Pascal, C - not so small, still fast and efficient, easier.

    C++ - bloated, incomprehensible.

    This is a personal view, and specifically excludes JAVA.

  3. Francis Fish
    Alien

    yeah, well

    C++ spawned Java because it was too hard to use. Java protects us from ourselves so well it's impossible to do anything useful without 200 XML config files and brain surgery.

    C++ was a trojan horse that screwed perfectly good C and then kept backwards compatibility to make it unusable in its own right

    MS C is simply a way of accessing their huge library of prebuilt functions

    Don't care.

  4. Robert Synnott
    Gates Halo

    Anti-C++ sentiments

    Write a large system in C. Then write the same system in C++ (proper C++, with the STL and maybe the odd template). You will find the C++ one to be less work, and probably less bug-prone.

    It's by no means the perfect language; I prefer Common Lisp myself. It does what it was designed to do very, very well, though.

  5. Barry Carr
    Coat

    Bjarne

    "Of course, the Danish computer scientist is best known as the creator and original implementer of C++."

    ...and a piss-poor haircut.

    Coat? Mine's the one with the scissors in the pocket

  6. John Stag

    Anybody who trashes C++ doesn't understand it.

    This myth needs busting.

    I too started in assembler, went through C and now I do C++.

    C++ is no more "bloated" or "slow" than C is, but is a lot more flexible and allows you to do a lot more stuff. Most importantly of all, it manages memory several orders of magnitude better than C does (and bad memory management is where all those machine-owning buffer overflow vulnerabilities come from). Sticking with C really is a mistake.

    As for people still using VC++ 6...

    For C++ development you should really upgrade to the Visual C++ Express. It's free, it's a much better compiler, much more standards-compliant, and the IDE is very similar to VC6 (none of the terrible Visual Studio bloat).

    I'm using the 2005 edition, I'll look at the 2008 edition when it gets to SP1.

  7. Ru

    @Robert Synnott

    I recall reading an interesting little note on the implementation of OpenBSD. As far as writing secure software goes, C is dangerous but simple, whereas C++ is dangerous and complex. Hence the reason that their kernel level code is in C.

    Take from that what you will.

  8. Anonymous Coward
    Anonymous Coward

    Java vs C++

    As Kevlin Henney once said in a training course I attended: "Java is C++ without the guns and knives".

    I use Java all the time at work, but there are always features of C++ that I miss: proper destruction of variables when they go out of scope, for instance. Java is littered with finally blocks specifically to simulate the resource acquisition by instantiation metaphor.

  9. Andy Larter
    Thumb Up

    Pro C++

    I've got to agree with John, there is no bloat involved with C++, and although the VS2008 IDE can be a pain to use, the compiler is fantastic.

    Learning 'proper' C++ was the best thing I ever did.

    My team works on a large project suite, all written in C++. I just did a check in the bug tracking system. We are tracking 1530 bugs and we've written about 2,000,000 lines of code. An average of about 1 bug per 1300 lines is a damn good average. Much better than I ever got when writing C.

    As for driver development, I really don’t know why kernel programmers choose C. The equivalent C++ is much simpler, more secure and less buggy. I've just checked the bugs reported for our file system filter driver....zero memory or resource related bugs. None..ever!

  10. James Anderson
    Flame

    Has anyone ever tried to read Bjarnes book.

    Bjarne Soutrups C++ book is one of the most unreadable technical books I have ever attempted.

    Whatever the relative merits of the languages at least Larry Wall can explain why Perl is like it is and does what it does.

  11. Kurt Guntheroth

    C++ is too hard to learn

    C++ is old enough to vote. What's up with that?

    I love C++. I code in C++ every day. It's 20x faster than Java, easier to debug than C. It's very expressive and powerful.

    But C++ is too hard to learn. Type conversion operators don't work like you'd expect. The name lookup rules are complex. Templates are powerful, but damn near impossible to debug. The body of knowledge on how to use exceptions effectively is still in its infancy. It takes two full-time years to learn the basics of C++. Anyone who think's he's "mastered" C++ in less time is delusional.

    Did I.Q.s drop in academia since I went to school? Is there truly no way to improve on C++? Give me a break.

  12. Brian Miller

    C++ produces Stockholm Syndrome

    You have been kidnapped by C++. You have become sympathetic to your captor, which is actually supposed to be your tool.

    As for C++ spawning Java, that just isn't so. Java was supposed to be a platform-independent solution to web applications. As it really is, Java is about as platform-independent as any binary. If you have had to produce a Java product for HP-UX, AIX, Solaris, Linux, and Windows, you'll know exactly the pain that I've seen.

    I think that the "popularity" of C++ is mainly due to the "popularity" of C, rather than the concept that C++ is better than other non-VM languages. C++ started out as a preprocessor hack, and a lot of the "power" and "versatility" of C++ is still in the C preprocessor.

  13. Anonymous Coward
    Thumb Up

    C++ is...

    Over the years I've coded pretty much everything. I started out life with 6502/Z80 assembler and Basic, went through Forth and APL, did Pascal and Modula-2. Had fun with C, C++, Haskell, Lisp, Java, C#, Perl, Python, loads of 4GLs, and a stack of minor stuff. Of all those languages, the one I like the most is C++.

    Don't get me wrong, C++ has its weaknesses. Its a very hard language to learn completely. If you don't believe me go and get the Template Meta-programming book by Abrahams and Gurtovoy. It also remains the most flexible language around. Since its a superset of C you can do all the bit-fiddling and other stuff that allows you to write drivers and kernel level stuff. At the same time, with lots of use of things like STL and Boost you can get the high level programming capabilities that allow you to rapid prototype anything and everything, and write huge robust systems. For speed, C++ is beatable, but only in specific fields - for example vector maths Fortran can beat C++, so can APL. For some driver/kernel level stuff you'll be able to write assembler that is better than C++. But as a general purpose language C++ is faster in more things than any other language. And as a true cross-platform programming medium, only C is better.

    Anyone who tries to tell me that Java is better cross-platform is having a laugh and has clearly never tried to port a complex java program between 2 different JVM vendors. Java manages the worst of both worlds. It is not portable, but in attempting to make it so, Sun have crippled the language. C# is more capable, but even less portable. I write C++ for multiple platforms, and would much prefer to do that with C++ than Java.

    Anyway, I think some day a better language will come along. But nothing has been invented yet that is better than C++ as a general purpose tool.

  14. Daniel B.
    Boffin

    I C Dead Code

    Ahhh C++. You know, that was my first intro to OOP, and is still my preferred language for OS-specific stuff, and native programming. Even if I embraced Java in recent times for business stuff (and well, my job requires it), I still regard C/C++ as my main language. As someone else already said, Java is C++ without the guns & knives. Plus, it's got C stuff, and I can even mesh in x86 assembly in there ;)

    The basic reason I did switch most of my stuff to Java was the lack of easy-to-use GUI libraries (except Qt, which is very easy to use) and the whole exception throw/catch things that made my life easier. Of course, after switching I discovered somewhere that try/catch was also implemented in C++, oops! Ok, ease-of-use for talking LDAP (JNDI) and JDBC Pooling bought me. And the whole J2EE thingy... though Java 5 EE kind of put me back, but that's another story.

    If Qt's win32 license wasn't so expensive ($1200/developer last I checked) I might have even done all my stuff on C++, as I would be able to do truly cross-platform stuff. Oh well...

  15. Anonymous Coward
    Happy

    It's the Swiss Army language

    Personally I love it, like I loved C when I learned that back in the 80s. I fully agree that Bjarne's book is as bad as the Kernighan and Ritchie C book was good, but that doesn't matter now that there are squillions of other books on the subject.

    It has its faults for sure, but there's no other language that spans the range from bit-twiddling in registers right up to big-system programming.

    Objective C is nice too, but unfortunately only really viable on Macs.

  16. Joe Cooper

    RE: multiple

    @Duncan Ellis

    I think what you're referring to is the fact that in C++ you can allocate classes on the stack. A stack allocation is zapped as soon as the stack is popped, which in C is when you hit a closing curly bracket.

    In Java, only primitives like int and pointers are stack allocated. Objects are allocated on the heap. When you come to the closing curly bracket, the pointer is popped, and if that was the only reference to the object, the garbage collector will get it on next cycle.

    ---

    @Brian Miller

    I think you're overdramatizing the portability issues a bit.

    Obviously you have to test it on every platform, but the fact that it's a common API and hides the very low level stuff is the biggest advantage.

    With C++, even using a common API, you will run into all kinds of weirdness taking it between platforms because of different compilers.

    And even if you're using the same compilers, you can run into machine-level bugs and oddities. And I don't just mean big and little endianess. Crickey.

  17. Don Mitchell

    C++ History and Some Thoughts

    I was at Bell Labs around the time C++ was being developed. It was shifting sands then, and I didn't jump in for a while, because others were seeing the language change under their feet.

    Doug McIlroy is one unsung hero of C++. He tried early on to write a projective geometry class and other experiments, and it was not possible becaues the language wasn't designed properly. Consequently, important changes were made before C++ was released to the outside world.

    Most professional programmers complain about programming languages when they are gathered together. Generally, we are forced to use two classes of badly designed languages: 1) academic exercises like LISP or ML or Haskell that just don't meet the requirements of professional development, or 2) languages that meet certain needs but are naively designed by people who don't quite know enough computer science(Ruby, Python, etc). C was one of the few languages that was practical and written by someone who knew what a grammer is (OK, it has if-else ambiguity, they weren't as careful as the designers of ADA).

    I haven't done much with Java. I remember years ago, Java as advertised as absolutely secure because it was interpreted instead of compiled. Laughable, but the computer science community believed it then. It's not quite as funny when Secunia warns us to update the JVM again to avoid some security hole or another.

    Admittedly C++ is overly complex and has too many dark corners where even experienced coders have to go look up the reference book. You can write ugly inefficient code in C++ if you lack good style and taste (witness the implementation of the standard template library). In retrospect, some sensible subset of ADA might be better, but it would have to be modernized as well.

  18. Oren

    RE: Template Debugging

    "Templates are powerful, but damn near impossible to debug. "

    That's true, but it's mainly a compiler error (failure to emit useful error messages) as opposed to a language issues. My hope was that C++0X would mandate compilers do a better job in this regard.

  19. Anonymous Coward
    Anonymous Coward

    am I the only one...

    who read the headline as "Stroustrup and Suffer" ?

    Personally I think life's too short to get worked up over the merits of different languages. You'll be arguing over compilers next...

  20. Christian Berger

    C++ is probably the only language

    C++ is probably the only language which changes faster than you can learn it. :)

    I mean seriously, if you really know what your compiler does and you keep a strict discipline you can most likely write excelent code in C++.

    However keep in mind that most programmers are not geniuses. They don't understand that C++ just maps some semi-OOP into plain procedural code, and that it's up to you to make sure nothing bad happens.

    It is extremely easy to make non-obvious mistakes which are hard to find. Just look at the whole issue of object copying which, in my opinion, is just brain damaged. I cannot imagine why someone would want to copy an object as the default thing the = operator does. Copying objects just is something that is less often needed than handing over a reference to an object.

    The only reason C++ is used so widely is that the competition is so weak. I mean Java only runs on virtual machines. Delphi is mostly a vendor lock-in (although I think there's a GPL compiler available for the language). Other languages either have no compilers available, or are interpreted.

    What C++ would need to become usefull again would be a radical simplification. Weed out everything and replace it with more powerfull features which work consistently.

    I mean there is no reason why you can overload + with one object on it's side, but not with 2 integers. Neither is there a reason why you shouldn't be able to overload 5. Both things work in forth, for example.

  21. Herby

    If you want examples of C++

    Just go to Bjarne's fine text. Then look for all the examples that include:

    // ...

    And fill in your own.

    Wonderful moving target that language. If you don't like it, wait a while and go back. Nice to have all those versions (up to 10, eh?).

    Maybe there IS a reason the Linux Kernel is written in C. If you change one file, you don't need to recompile the WHOLE kernel. "Minor tweaks", yeah, right!!

  22. Chris Rimmer

    @Brian Miller

    "C++ started out as a preprocessor hack"

    That's a common fallacy. Early C++ implementations by Stroustrup were full compilers whose back-end generated C instead of machine code. Very sensible, given that there were lots of C compilers around which could generate machine code for a wide variety of binary targets, and there was only a single C++ compiler writer.

    ", and a lot of the "power" and "versatility" of C++ is still in the C preprocessor."

    That's not true. The power and versatility of C++ come from the support for OO and generic programming, and the powerful standard library. Preprocessor hacks are rare in most modern C++, and various features of C++ were put in with the deliberate aim of reducing use of the preprocessor to a minimum e.g. templates for functions like min()/max(), constant variables being constant expressions, and inline functions.

    I agree that a large part of the popularity of C++ is because of the popularity of C. I think that a major reason for that is that Stroustrup (like K&R) doesn't force his ideas of good style down your throat, instead allowing you to make decisions for yourself based on your own constraints, though the structure of C++ is designed to allow you to express your designs very cleanly.

    You do have to learn how though, and that does take a lot of effort. Trying to write C++ using only those skills you've learned while writing in C and similar languages will end up with you producing some very poor C++ code. The key is to understand what problems the various language features were designed to solve. Reading "Effective C++" by Scott Meyers, and "The Design and Evolution of C++" by Stroustrup helps a lot.

  23. Mad Hacker

    C++x? Maybe all classes will inherit from a base class now?

    I think one of the biggest shortcomings of C++ was the oversight of making all classes inherit off of a single base class. That would solve so many hidden complexities.

    Also, my computer is fast enough for 2 pass compilation, so let's drop .h files. I shouldn't have to define my interface in two separate files.

    Oh and give me native smart pointers that take care of garbage collection.

    Lastly, add a GUI layer so I don't have to recode all the GUI code based on proprietary libraries for every target platform. In fact, include OpenGL in that layer for good measure.

    Oh and a unified hardware library so I can access USB and FireWire devices on different platforms without modifying my code.

  24. Curtis W. Rendon
    Boffin

    I have used C++

    And it is bloated, and goddess help you debug it.

    And save me from the high priests who can't stand any criticism of the language or OO.

    I have written very large projects in C, and others in C++, and I slept better when the C projects deployed.

  25. Anonymous Coward
    Anonymous Coward

    security?

    "It's not quite as funny when Secunia warns us to update the JVM again to avoid some security hole or another."

    Overall, the world is probably safer having only a handful of applications (the JVMs) in which to search for buffer overflows and other such nasty issues. The alternative seems to be individually worrying about the security of every single C++ application ever written.

  26. Matthew Barker
    Coat

    The price of complexity is...

    ...an expensive language-specific track at an industry convention...

    From the article: "And yet they found a curious thing: every year for four years, C++ was the strongest track at the show. With zero advertising! That says something about the market. That says that there are problems that C++ is solving."

    Faulty reasoning: It could also say that there are too many people still having difficulty getting a leg up on the language. Or maybe the convention conveners are getting a leg over on the attendees.

    I see folks using all sorts of OO languages. C++ is the one I've seen folks wrestling the most with since I started using it in 1989.

    On the "++" side, I do like it better than Perl, which has an even better bug-hiding system. And I have seen high-perf server systems, written by experienced C++ geeks, having portions rewritten in C to squeeze out better performance.

    Still, like my grandmother used to say: most performance improvements are algorithmic. So it doesn't much matter what language you write in, as long as you can speak it.

    Unfortunately, when the original coders have left the company, the comments are missing along with design docs and original requirements, it does matter very much when you want to maintain the code.

    Cheers,

    Matthew

  27. This post has been deleted by its author

  28. This post has been deleted by its author

  29. Anonymous Coward
    Anonymous Coward

    @Joe Cooper

    Exactly right - thank you for clarifying my hastily written comment.

    The idiom I like in C++ is acquiring resources by instantiating an object on the stack, which is then released by the destructor as it goes out of scope. This is very effective for everything from files to mutexes, and is a good use of object lifetimes that simply isn't supported in Java.

    Oh well. Back to writing dispose() methods for Eclipse controls so their SWT implementations are cleared out properly.

    *grumble*

  30. Anonymous Coward
    Anonymous Coward

    Complexity (of the language)

    Just compare the books written by the proponents of the language.

    K & R: about 3/8 inch thick.

    Bjarne's book: about 1 inch think.

    These people are the originators of the language, so THEY ought to know how complex it is. Me? just compare the volumes to see what is more complex and harder to learn. Sure C++ will "do it all", but does anyone understand what is going on?

    He says after finding a bug in a junky Fortran program (*SIGH*)

  31. Tom

    Tchah! The youth of today!!

    C++ to hard to learn?

    When I've had the pleasure of helping people learn programming I have found that if you introduce then to any OO language they say its too hard to learn. Then they try another OO language and say 'thats much easier'. Generally because they've slowly started to understand OO concepts.

    OO seems to be the exception to the programmers rule that 'I learned this language first so its the best'.

    Me - I learned OO techniques in assembler and buckets of asterixes in C and sed scripting so any 'modern' OO is fine by me especially if theres a nice (free) IDE!

    Remember - if a problems hard then its hard and sticking a GUI on it only makes you make mistakes faster.

  32. Anonymous Coward
    Anonymous Coward

    @Duncan Ellis

    The reason you're missing stack allocated objects is because you're using SWT, in which the garbage collector is not responsible for reclaiming memory. Unless you're writing an Eclipse extension, then it's your own fault for using SWT instead of Swing.

    As for posts by others, the reason C++ is not used for much kernel development is that when you do, you end up using a tiny subset of C++ (STL is out, virtual inheritance is often out as well). This ultimately makes it seem like a pointless exercise (Linux for example, was briefly going down the C++ route but reverted to C). As for portability, a virtual machine written in C is far easier to port than a C++ compiler. Simpler and more consistent OOP languages such as Java and Objective-C are also far more easy to learn, and lack the constantly changing, almost impossible to implement complexity of C++.

  33. James

    @Curtis W. Rendon

    I suggest you change jobs if you sleep badly when your C++ projects deploy. That's not a sign of a bad language, but an imcompetent programmer.

  34. Brian

    Programming languages

    The thing to remember is that a programming language is a tool. For certain jobs one tool will be better than another. If I am writing an operating system, compiler or anything else where high performance is a must, the C/C++ is the way to go.

    If I was making a front end GUI to perform simple Database queries, then I would probably use a different language, like Java, VB, C#.

    All languages have good points and bad points.

  35. Jason Bloomberg Silver badge

    Nothing better ?

    People who chain themselves up, climb into sacks, are hoisted up forty feet, get set on fire and arrive back unscathed with a "Tada!" say it's easy when you know how.

    I've always hated C++ and never understood how it caught on or why there's been nothing that has replaced it. IMO, C++ is a horrible hack which is hard to learn and there's got to be a better alternative. Unfortunately many people seem to believe that C++ is the pinnacle of software achievement. Gawd help us.

  36. The Other Steve

    Style/Taste

    "You can write ugly inefficient code in C++ if you lack good style and taste"

    In all fairness though, you'll write ugly, inefficient code in most any language if you lack those things. (Or if you don't know what you're doing, or hate the person who will have to maintain the code, possibly just by extension from general misanthropy.)

  37. This post has been deleted by its author

  38. David Heffernan

    I was there at SD west

    I was actually at these sessions at SD West. I think what a lot of you are missing is that a lot of design decisions in the development of C++ were to support legacy code. For example the support for plain C, C++0x changes are careful not to break old stuff.

    Whilst this will keep C++ popular and thriving for a while I feel that, like every language in history, eventually it won't be able to both adapt to new demands and meet legacy compatibility concerns. At that point something else will take over in its space (portable code for high performance large systems).

    I think you should all bear that in mind before you toss brickbats. I personally never write in C++ (don't like it), but you've got to respect a language that has been so successful and proven adept to coping with change,

  39. Joe Cooper
    Thumb Up

    @Duncan Ellis

    Of course, you know the garbage collector will queue them for deletion automatically once the references go out of scope.

    If you're writing a desktop app or something that's just waiting for user input than that would be dandy to take advantage of. Save you lots of time; have confidence that the computer ~will~ zap those things when it gets around to it.

    Only time I ever ran into trouble was with a video decoder that had to puke out three dozen BufferedImages a second; the garbage collecter would keep kicking in every second or two and visibly interrupting the video.

    So what I did there was create a list of extended BufferedImages that were "recycleable"... A bit of a hack yes, but the only time I've ever had to do that.

    And yes, manual memory management is definitely faster, and stack allocations are faster than heap allocations.

    But if you're using Java, take advantage of it. Don't be recoding File classes to deallocate on command - very probably a waste of time unless your program is a very special case.

  40. Subtilior

    Effing

    There is no other programming language as capable as C++ when you are creating complex software that needs to be highly efficient. Lisp comes close, except for the cons-ing overhead. C is fine for simple software. Other popular modern languages lose out when you need real world efficiency, whatever their other virtues.

  41. JamesH

    C++ a 'changing' language' ???

    Bit confused - lots of comments saying that C++ is a shifting language, but as far as I know, the basic language has remained unchanged for years (and I have been using it for over 10 years)

    Yes, there have been the addition of templates (but you dont HAVE to use them), and the STL, but the STL is NOT PART OF THE LANGUAGE. It's a set of headers and libaries that use the language.

    OK, to get the real benefits you can learn and use STL (and Boost - which if you program in C++ and are ignoring - shame on you), but I say again, the basic language has not changed in YEARS.

    As someone who came to C++ via first Basic and assembler, then Pascal, then C (plus a few other bits and pieces), I find it is faster to write robust code in C++ than anything I have used before - but its does take time to get good at it. I have not used Java to any great extent so will refrain from commenting on that argument!

    James H

  42. auser

    For a correct oop language...

    you should try smalltalk. Java is the descendant of c and smalltalk, not c++. Actually as long as c++ doesn't have a standard typeof() functionality or some form of dynamic classing (like the nonstandard microsoft class interface extension), it's very painful to write dynamic programs. C++ is a statically linked language, with such misfeatures as having static classes, class pointers and class references with different syntax and no proper unified interface. Not to mention the lack of dynamic interface types and proper property support. (all available as proprietary extensions in various microsoft products and as completly incompatbible variants in other compilers)

    The only truely supported standard language is c. You can write good oop code in c, and it's not really harder if you have a properly typed macro preprocessor (aka. template support).

    ps: Why kernel developers avoid c++? Because in c++ you can't make all memory allocations explicit or if you do, you end up with plain c. And in a classic kernel, you have to jump through various loops to get even the smallest amount of memory allocated. This is true for most kernels, including the winnt line, linux or bsd.

  43. John Vaudin
    Boffin

    @JamesH

    I've been using C++ for over 20 years, and believe me it has changed in that time! Multple inheritance, templates, exceptions, standard library etc.

    It's all very well saying you don't have to use these things, but developers just love to use the latest thing. So, in large, long running projects, where lots of different developers have worked on it over many year, you end up with code written using every concievable paradigm that C++ supports - all in the same project! OK - I know you're going to say it's a failure of management - but it does happen - I've seen it. And it's a complete nightmare.

    At least with something like Java the intended OO paradigm is faily clear-cut, so code tends to be more consistent. (Although I fear Java may be going to the same way as C++. When will people learn that adding features to anything has a downside?

    It seems to me that C++ falls between two stools. On the one hand low-level code - kernels, device driver etc. seem better written in C, with it's much simpler run-time requirements, whereas user-level applications seem better written in Java or C# - with their safer memory handling and extensive class libraries and so on. Which leaves C++ to scratch about in the hard-realtime embedded comms market, where it probably does make sense. But it's going to become increasingly irrelevant to the mainstream IT world.

  44. red floyd
    Thumb Up

    @Andy Larter

    The reason most kernel drivers are written in C is that there's no support in the kernel for the C++ runtime.

  45. Ishkandar

    C++ book

    I think it was written in Danish and translated via Double-Dutch into English !! Having said that my copy of that book is still in its place of honour amongst my programming books.

    Unfortunately I've left programming for pastures newer and more lucrative but I still go back and play with programming once in a while, now that I can afford to do what I want instead of doing what others want me to do !!

    Aah. The good old days....

  46. Kurt Guntheroth
    Unhappy

    everything old is new again

    If recycling will save the planet, then the recycled platitudes and fallacious arguments in this one thread should go a long way.

    It's clever of "Tom" to say C++ must be easy to learn because C and sed(??!) were. When C++ was coming into widespread use, it was a common argument that, "I hearned Pascal and C in a few weeks, how hard could C++ be?" But the reality was different. If you knew Pascal, then learning C was just learning how to spell the keywords; the coding paradigms were the same. But with C++, you *also* had to learn OOP. And exceptions. And generic programming with templates. And STL. Learning C++ was like learning C half a dozen times. Everybody thought they'd just quickly master C++, but in reality it took even good programmers 2 years.

    Then there's "auser" and the smalltalk wheeze. C++ isn't *really* object oriented because it isn't like smalltalk. C++ can't do dynamic programming (by which I assume he really means polymorphism, which C++ does fine, just not like smalltalk). It's easy to learn your first programming languatge. It's easy to learn your 10th programming language. But learning your second language is hard, because it isn't just like your first language. So that second language seems all wrong. Once you've learned a dozen languages, you know that.

    Only these days we don't learn a dozen languages. Innovation has stagnated. C++ sucks in many ways, but it works reasonably well. And a C++ compiler is a humongous thing. Wirth turned out a compiler for Pascal in about 5000 lines of Pascal code. I don't know how big GCC is, but I'm guessing a million lines. Not an easily duplicated effort for a single researcher. That leaves microsoft in charge of innovation, with predictable results.

  47. amanfromMars Silver badge

    The Font?

    "Stroustrup added: "I still have code I wrote before it was called C++ that, with some minor tweaks, runs.""

    POW WOW ...... XXXXtra Virgin Source. :-) Code Foundations. ....on a Theory for Everything is Virtual CodeXXXX? We Think Therefore.

    Now as Preposterous as that may sound, it is a Perfectly Valid and Viable Question for the Present about the Future.

    Thanks for your Understanding.

  48. David Heffernan

    Stroustrup books

    At the sessions Herb Sutter was handing out copies of his and Stroustroup's books for particularly noteworthy contributions from the audience. Everyone chose Herb's books until there were a pile of unwanted Bjarne tomes left.

  49. amanfromMars Silver badge
    Alien

    KISS ... Keep IT Simple Stupendous

    "Unfortunately I've left programming for pastures newer and more lucrative but I still go back and play with programming once in a while, now that I can afford to do what I want instead of doing what others want me to do !!

    Aah. The good old days...." ... By Ishkandar Posted Monday 10th March 2008 15:43 GMT

    Ishkandar,

    What would be more lucrative than creating pastures new with Programming. For would that not be Real Leadership? Aah ...Good Old Beta Days every Day.

    And the added bonus would be that it would be afforded you to do it, making it costless.

  50. Ian Michael Gumby
    Paris Hilton

    C++ vs Java? huh?

    Like a lot of others here, I've put in 20+ years in this industry.

    Name a language, I've been asked to look at it and or use it.

    There are languages that I'd like to call "perfect languages".

    C is one of them.

    C++ is not. No offense to those who love C++, but when you spend a lot of time and effort cleaning up after other people's fsck-ups, you learn to hate a language.

    I've written big systems in C, and its works fine. Java is really for the masses and even still, I'm seeing some pretty poor code being generated and passed off as industry acceptable.

    You want a nice OO language, look at Objective C. Its easy to learn and takes the best of smalltalk and C.

    But hey! What do I know? I just use what I'm told to use and get paid for it. ;-)

    Why Paris? Because this thread is a pretty lame argument about which language is better...

  51. Neil
    Heart

    I used to love her, but i had to kill her.....

    Surely one of the main reaossn there are so many C++ developers still out there is the amount of lagacy stuff that you can get for it. Importing a DLL into c# may be easy, but try doing that with a lib file and a header. I came from the ASM, C, C++ lineage, and currently enjoy the benefits of C#/.net. Going back to C++ reminds me of how painful some of it is, but also how simple and elegant some of it is too.

    When I was taught C, the main benefit was apparently the fact that it was portable (I laugh in retrospect). My main grpe with C++ these days is that most people Ive met dont realise where C++ ends and MFC/Win32/whatever begins, negating most of its portability. A friend of mine told me that writing to a database was easy in C++. All the code was MFC-based. Try porting that to *nix, or whatever other system you can think of. Good C++ programmers will always be in demand, and bad ones will be too, as C++ is considered by almost everyone I know as a "low level" language, thus carries some Kudos with it these days. Bear in mind these people learnt nothing but Java at Uni, and pointers are hardcore, apparently.

    I miss the hackery of my early C and C++ days. I think each language signifies an era in my life - assembler i did in Turbo Assembler. C in Turbo C in DOS. C++ in Turbo C++ on Win 95 (writing graphics apps in Mode 13H - those were the days - back when these was Windows sat on DOS). C++ Builder on Win 98, and C# on XP. Each iteration has added something to the last, but also lost something on the way. I keep meaning to find the time to go back and write some small assembler apps, just to reinforce some of those basic principles that we take for granted..........

This topic is closed for new posts.