Slashdot Mirror


Scott Meyers Retires From Involvement With C++ (blogspot.com)

An anonymous reader writes: If you've studied C++ any time in the past 25 years, you've probably read something by Scott Meyers. He wrote Effective C++, regarded by many as one of the top two books for learning to work with the language. He also wrote similar books about changes in C++11 and C++14, as well as making good use of the Standard Template Library. He's been a seemingly endless source of instructional videos, articles, and helpful answers on Usenet and StackOverflow. Unfortunately for us, Meyers has now decided to move on. "25 years after publication of my first academic papers involving C++, I'm retiring from active involvement with the language. It's a good time for it. My job is explaining C++ and how to use it, but the C++ explanation biz is bustling. ... My voice is dropping out, but a great chorus will continue." Thanks for all the help, Scott.

53 of 112 comments (clear)

  1. Thank you. by c · · Score: 3, Informative

    Twenty years ago, Effective C++ was the book which convinced me that C++ was so full of land mines and other hidden traps that I needed to walk away from it and never, ever touch that pile of crap again.

    Okay, I lied. It didn't take the entire book; I got the hint after the first five chapters.

    --
    Log in or piss off.
    1. Re:Thank you. by erapert · · Score: 5, Insightful

      1. So what do you use instead?
      2. Did you know C++ has moved on quite a bit in the past twenty years?

    2. Re:Thank you. by Anonymous Coward · · Score: 1

      Bonehead. Effective C++ is a book for experienced C++ programmers. If that was your first port of call then no wonder you were intimidated.

    3. Re:Thank you. by The+Evil+Atheist · · Score: 1

      Most of those land mines and hidden traps are inconsequential any way. They either stop your program from compiling, meaning you have to dig through compiler errors rather than customer logs, or they prevent the program being better optimized. They weren't end of the world scenarios and you wouldn't even really touch them unless you were in the business of writing highly portable generic libraries. In which case it matters that you understand the differences between hardware and software platforms regardless of what language you're writing in anyway.

      In any case, your problem is one of perception. If you'd written a book on all the pitfalls and land mines of the language that you prefer, you'd soon realize how many ad hoc implicit rules you've internalized. But because you've dedicated your time to using the language, soaking up all the workarounds and tricks, it feels like your language is free from pitfalls.

      --
      Those who do not learn from commit history are doomed to regress it.
    4. Re:Thank you. by PolygamousRanchKid+ · · Score: 4, Informative

      C++ was so full of land mines and other hidden traps

      I wouldn't say that "C++ was is full of land mines and other hidden traps". However, C++ enables you to bury your own land mines, and build your own hidden traps. Effective C++ taught me what stuff I need to avoid.

      In fact, a project manager tasked me with creating some programming standards for our C++ project . . . a job that nobody wanted to do. This was because all the programmers were very good, but used to programming alone, and doing things their own way. There was guaranteed to be blood, devastation, death, war and horror in this discussion. So I created a presentation based on Effective C++. When we went through all the items, there was dissension indeed, but when I fell back, and we went through the wisdom of Meyers' text, we found grudgingly agreement.

      To summarize, C++ is a very powerful language you can unwittingly write your own H-bomb with it. So it is great to have someone like Meyers to help you from nuking yourself.

      --
      Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
    5. Re:Thank you. by Anonymous Coward · · Score: 2, Insightful

      A combination of Lisp and Ada, of course!

    6. Re:Thank you. by Greyfox · · Score: 4, Interesting
      It was pretty shit the first couple of times I looked at it in the early 90's. IIRC the first time I looked at it, the language didn't even have templates yet. I also vaguely recall the discussion about templates and thinking that it was a cool idea. The early C++ libraries were basically written in C, using most pointers and with plenty of difficulty determining who owned what resources at what times. At the time no one really knew how to do object oriented design, either. The whole design patterns discussion and RAII really started cleaning things up a few years later. Boost provides pretty good coverage of the gaps in the standard language library, though the standards committee seems to have pretty much addressed that by pulling a good chunk of boost into the standard.

      I used the language for a test data generation project a couple years ago and was quite impressed with how nice it was to work with -- easily as easy as writing a java program. I needed a math library to generate the data and considered several languages. The Eigen C++ library I found looked like it had the easiest API to get into, with reasonably clear documentation and examples. I was able to organize the functionality of the program into unit-tested libraries. Between that and the strict type checking in the compile phase, I was able to deploy with very high confidence that I wouldn't be introducing any bugs into the environment.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    7. Re:Thank you. by c · · Score: 3, Interesting

      They weren't end of the world scenarios and you wouldn't even really touch them unless you were in the business of writing highly portable generic libraries.

      ... which is the sort of thing I was doing at the time.

      Granted, at the time we were also using a mid-90's vintage of Visual C++ and trying to port to things like g++ on Linux, BeOS, MacOS, etc, so much of the issues we had were less due to "C++ the language" and more because of "C++ the implementation(s)", but Meyers' book was the icing on an increasingly unpalatable cake.

      --
      Log in or piss off.
    8. Re: Thank you. by Sid314 · · Score: 1

      I take your language of choice is BrainFuck?

    9. Re:Thank you. by The+Evil+Atheist · · Score: 1

      So what language did you end up using to write highly portable generic libraries? Did performance also matter, or was it just enough that it was somewhat easier to use?

      I would assume the code you were trying to port had a lot of legacy things and preprocessor macros everywhere.

      --
      Those who do not learn from commit history are doomed to regress it.
    10. Re:Thank you. by c · · Score: 2

      1. So what do you use instead?

      Oh, I went old school. C and perl, for the most part. Nobody in their right mind would claim they're good languages, but they're frictionless in a way I never felt when I was working with C++.

      2. Did you know C++ has moved on quite a bit in the past twenty years?

      I would certainly hope so. That being said, I have absolutely zero interest in rekindling our relationship.

      --
      Log in or piss off.
    11. Re:Thank you. by c · · Score: 1

      So what language did you end up using to write highly portable generic libraries?

      Oh, I used C++. That was the job. There wasn't a lot of love, but it got done and it worked well. Then I moved on.

      --
      Log in or piss off.
    12. Re:Thank you. by mikael · · Score: 1

      I took a course on C++ back in the mid-1990's. According to the professors back then, the attitude was "Oh, don't learn STL, it's full of bugs, and they're still trying to shake them out". Guess the direction that industry went?

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    13. Re:Thank you. by MouseTheLuckyDog · · Score: 4, Informative

      Right. Like C and Perl don't have more landmines.

    14. Re:Thank you. by clockley(571021718) · · Score: 1

      Your post is simply the peevish ramblings of someone that has no idea or appreciation of what s/he's mocking.

    15. Re:Thank you. by Anonymous Coward · · Score: 1

      I agree with what you're saying, but i disagree with your ability to say it.

    16. Re:Thank you. by Anonymous Coward · · Score: 1

      A lot less of those it seems like it should be one way but C++ does it in a completely weird way. E.g. the way they finally fixed those "move" constructors... I bet 99% of C++ programmers weren't aware of the entire "copy" process that was happening when they were assigning variables.

      C and Perl seem like a pretty good combination. Do all coding in Perl, and anything that needs raw-speed do in C.

    17. Re:Thank you. by swillden · · Score: 4, Insightful

      Right. Like C and Perl don't have more landmines.

      I like C++, and consider it my preferred language for most work, but it clearly has more landmines than any other major language. It's not hard to avoid them, but you do have to know where they are.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    18. Re:Thank you. by rochrist · · Score: 1

      TL;DR

    19. Re:Thank you. by The+Evil+Atheist · · Score: 2

      Only if they come from a reference semantics background. If they came from a C background, they'd be using pointers to pass by reference any way. Also a lot of C++ is copy-on-write which makes the copying cheap.

      C isn't that good for raw speed either. What you call weird about copy constructors actually makes sense if you understand value semantics rather than reference semantics. Using values can be faster than using pointers to values, and for concurrent/parallel operations it's often better to copy data then synchronizing on shared data.

      Other than that, the default copy and move constructors are more than adequate in most cases anyway, especially if people composed their types with other types that already handle their own resource management.

      --
      Those who do not learn from commit history are doomed to regress it.
    20. Re:Thank you. by The+Evil+Atheist · · Score: 1

      The professor for my degree's C++ unit said he wouldn't touch the STL at all. This was 2005. By then STL had already stabilized quite a bit

      --
      Those who do not learn from commit history are doomed to regress it.
    21. Re:Thank you. by laffer1 · · Score: 1

      That's actually part of the problem. I learned C++ in 2003. At that point, it was somewhat usable but had very strange scoping rules compared to any other OO language I've seen since. Modern C++ has garbage collection, a thread abstraction and so on but at the time it had none of those things. My biggest issue with C++ is that it's so big and inconsistent. Since the STL grew up with contributions from all over the place, it's not a very consistent language. Take C# or to a lesser degree Java and look at the consistency with naming conventions, how things are structured in namespaces, etc. C++ is missing a lot of that. Rather than fix it, they just keep adding more crap on to it to keep it relevant.

      C++ has it's place, but it's not the end all language that proponents make it out to be. If someone is really into C++, it's all they will use. They can't see it's flaws or they've accepted them long ago. For the rest of us, it's a clunk language with little performance benefit over modern languages.

    22. Re:Thank you. by tlambert · · Score: 1

      I like C++, and consider it my preferred language for most work, but it clearly has more landmines than any other major language. It's not hard to avoid them, but you do have to know where they are.

      >*CLICK*<

      There's one now!

      LOL!

    23. Re:Thank you. by HiThere · · Score: 1

      Whether they have more landmines or not depends on what you're doing. For some purposes C is the optimal language. For some purposes C++ is a lot better. (In both cases I find a lot of the syntax abominable. D got that a lot better. But D came late to the table, and all the libraries are written for C or C++.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    24. Re:Thank you. by imac.usr · · Score: 1

      > There was guaranteed to be blood, devastation, death, war and horror in this discussion.

      And gardening?

      --
      I use Macs for work, Linux for education, and Windows for cardplaying.
    25. Re:Thank you. by mikael · · Score: 1

      The simplest example that we were given was creating a derived class A with virtual inheritance from class B (class A : public virtual B) , then trying to create a container class C using STL vector (class C : public A), then adding and deleting items from a instance of class C. No end of chaos as the run-time environment tries to manage partially deleted objects. In the real-world, there could dozens of inherited classes between B and A. It would be more logical to use smart pointers in this case, but that's the sort of mess that can happen with just a single keyword placed somewhere.

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    26. Re:Thank you. by Rutulian · · Score: 1

      But Perl, well, let me just leave this here,

      https://www.youtube.com/watch?... [youtube.com]
      or Perl Jam 2, the Camel Strikes Back

      You're kidding right? That presentation is based entirely on developers not sanitizing user input, from the Internet no less, which will of course lead to vulnerabilities. I don't buy that it is an inherent weakness of the language. If you blindly submit SQL queries passed around as variables, you deserve what you get. That is just really bad programming in any language. Did they do a PHP jam?

    27. Re:Thank you. by J.+J.+Ramsey · · Score: 1

      Bear in mind that one generally isn't supposed to publically inherit from STL classes such as vector, since they don't have virtual destructors. Generally speaking, with C++, it's better to use composition to reuse functionality (e.g. making an STL vector a data member of a class) and to use inheritance to implement run-time polymorphism.

    28. Re:Thank you. by erapert · · Score: 1

      Maybe I like C++ because I don't have to manually implement vtables and linked lists. (not that I ever use linked lists if I can help it...)
      Maybe I like being able to overload functions and do some generic programming.
      Maybe I like the features that came out with C++11.

  2. Another shameless profit-monger... by andrewa · · Score: 3, Funny

    Scott was one of the many greedy people to profit from Stroustrup's clever industry cons! Read this revealing leaked interview (Invention of C++) from 1998 and learn the truth!

    Sarcasm mode off...
    Thanks Scott! You will be missed!

    --
    :(){ :|:& };:
    1. Re:Another shameless profit-monger... by tepples · · Score: 1

      Are there UFOs WITH aliens

      If so, big whoop. If a helicopter is being flown in the U.S. by Canadians, and you can't tell what model it is, it's a "UFO with aliens".

    2. Re:Another shameless profit-monger... by Uecker · · Score: 1

      Scott openly admits that he has profited from the unnecessary complexity of C++. See his D-lang conference talk.

    3. Re:Another shameless profit-monger... by andrewa · · Score: 1

      whoosh...

      --
      :(){ :|:& };:
    4. Re:Another shameless profit-monger... by Uecker · · Score: 1

      no woosh. I know the interview is fake. But it is true that the language is a mess and that Scott profited from that.

  3. Re: Rust is the successor to C++. by Anonymous Coward · · Score: 2, Funny

    Let's cobble together a newfangled language with a hip new syntax every few years. Yeah, that'll be great for the industry.

  4. Self-defeating name: Rust by Futurepower(R) · · Score: 1, Offtopic

    Programmers often choose self-defeating names. Imagine going to a top manager and saying you want to program a product in Rust.

    GIMP means "a derrogatory term for someone that is disabled or has a medicial problem that results in physical impairment".

    GNU.

    LaTeX is written in both English and Greek letters.

    There is nothing "regular" about Regular Expressions.

    NetLoony Apache Server GUI and Tools. Looney is someone who is "Extremely foolish or silly".

    pGina is not VaGina.

    Would your boss take Bouncy Castle cryptography seriously. Or would he think it's for children?

    1. Re: Self-defeating name: Rust by bill_mcgonigle · · Score: 2

      Your boss is an idiot. Do what you please, but your talents are probably undervalued where you are.

      In fact, I propose even more infantile project names to put the morons at a further economic disadvantage.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    2. Re:Self-defeating name: Rust by cstacy · · Score: 1

      You forgot Lisp!

    3. Re: Self-defeating name: Rust by KGIII · · Score: 1

      Rum is like force, it fixes everything. If you've tried either and still found that it is not working then you need to apply more of it.

      I kind of miss drinking. Oh well... I did have a couple for the Christmas holiday (two and only two but they were mostly rum with a splash of coke) and I'll be responsible for others and making things go as high was ~650 feet and going boom tomorrow night (which is when the NYE fest is) so it wouldn't be a good idea to drink tomorrow.

      That's unfortunate because things that go boom and alcohol are two things that go naturally hand-in-hand. They're so belonging together that we have a whole government agency called the BATFE. To paraphrase another's /.er's signature; The BATFE should be the name of a retail outlet. This being America, and my being in Florida, I'll even go so far as to suggest that it shouldn't just be a store but it should be a store with a convenient drive-thru window.

      --
      "So long and thanks for all the fish."
    4. Re:Self-defeating name: Rust by david_thornley · · Score: 2

      It's a bit late to jump in, but...

      Regular Expressions are defined as part of the Chomsky hierarchy of languages and grammar: the lowest level, the ones that can be recognized by a finite state machine. This means that they recognize sequential characters, choices between characters, and indefinite repetition, with grouping allowed. In Perl, they can be represented with ordinary characters with [] for character classes, () for grouping, | for alternation, and * for indefinite repetition.

      On this theoretical basis, people started adding extras to them, making them much more powerful than regular expressions, but they still called them that.

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  5. Free by The+Evil+Atheist · · Score: 4, Interesting

    Basically there's a lot of free talks on Youtube these days that give better advice for people who actually write code. Scott Meyers is great and all, but he admits that he doesn't actually write code. These days I look to people like Alex Stepanov and Sean Parent. I think Sean Parent's talk on rotate and partition alone is a more effective way to think about C++ than that whole business about OO.

    --
    Those who do not learn from commit history are doomed to regress it.
    1. Re:Free by The+Evil+Atheist · · Score: 1

      The point is that they're not reference materials. If you want information, go to the reference. If you want to understand, you do the learning.

      --
      Those who do not learn from commit history are doomed to regress it.
    2. Re:Free by dcollins117 · · Score: 4, Informative

      Posting the link to Parent's talk so the truly interested don't have to search for it (like I did). Hopefully this is the one you were talking about.

      https://www.youtube.com/watch?v=qH6sSOr-yk8

    3. Re:Free by hmckee · · Score: 1

      So true. While the video by Parent is very good (I'm glad I watched it), the problem with videos is that they fail to address the differences in learning preferences. Some people learn better with videos while others prefer reading. Videos also limit everyone to the same speed and concentration thresholds. Reading allows you to concentrate and comprehend at your own level and speed.

      PS: Is the D1 discussion setting broken? I had to switch to D2, reload, change my discussion settings before allowed to post with my username. WTF!?

  6. Re: Rust is the successor to C++. by Fragnet · · Score: 1

    Replaced? No. All 3 are valid.

  7. I wish you well Scott by Anonymous Coward · · Score: 1

    I wish you well Scott. Your books made me a much better programmer than my peers.

  8. Re:Goodbye by rochrist · · Score: 1

    Ah, slashdot, never change!

  9. Re:books like meyers are c++'s problem by OhPlz · · Score: 1

    He's probably bowing out at a good time. I just got his "Effective Modern C++" book and while I haven't read it yet, scanning the contents it looks to be more of an introduction to what's new rather than an analysis of a list of gotchas like his earlier C++ and STL books. C++ has made some impressive leaps forward. He may have been in danger of running out of material if he stayed in it.

  10. Re:Rust is the successor to C++. by HiThere · · Score: 1

    Rust has some nice features, but somebody needs to write some decent documentation for it if it's ever going to be popular.

    OTOH, considering that it's just reached 1.0 it may not be doing to badly. But *SOME* languages have decent documentation early, and others never seem to get it. Examples of good documentation are Python, D, and Ruby. Original Pascal had decent documentation, but it doesn't cover the modern dialect, which has lousy documentation. Lisp documentation is OK, but nothing great. Smalltalk has reasonably good documentation, considering. Ada has excellent documentation, also considering. (Note that documentation doesn't make up for basic problems with the language, but seems to be necessary for adoption...reasonably.) FWIW, I don't really know about current Perl, but I didn't like what I saw of Perl5 documentation. This wasn't much as I didn't like the language.

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.
  11. Violins and snowflakes by frrrp · · Score: 1

    This is an endless drone. I wonder how many women out there have ever had their genitals smeared with engine grease and drill shavings - something way to many boys did in apprenticeships. They all refused to curl into foetal positions and cry for nanny to save them and generally got over it and progressed to be something in their fields. This is the bubble wrap child generation reaching their mutated version of "maturity" - and expecting the same coddling as when they were in "everyone is a winner" school. I feel more nauseous each time another one of these #SJW articles barfs itself all over my screen. Heat and kitchens etc.

    --
    smilies are for reetards
  12. 25 years by thisisauniqueid · · Score: 1

    The unfortunate part of all this is that C++ takes 25 years to fully explain to everybody (while it continues to evolve, slapping band aid on top of band aid).

    1. Re:25 years by mikael · · Score: 1

      I think that is happening to every language environment. Web page design started with HTML, but now there are CSS style sheets, PHP for getting server processes to run, JavaScript, AJAX, JQuery, Java, WebGL. You don't just learn C on it's own, that has to go with some hardware environment.

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
  13. The two best books are A. by hoggoth · · Score: 1

    "Effective C++, regarded by many as one of the top two books"

    Ah Slashdot. How can you write THE TWO BEST THINGS ARE 'A' and not follow that up? And not one comment mentions it either.
    Is this something everybody knows? Or will this start an argument?

    What is the other top book on C++?

    --
    - For the complete works of Shakespeare: cat /dev/random (may take some time)