Search
Scott Meyers

SE Radio 159: C++0X with Scott Meyers

Recording Venue: Skype
Guest: Scott Meyers
Host: Markus Völter
This episode is a conversation with Scott Meyers about the upcoming C++0x standard. We talk a bit about the reasons for creating this new standard and then cover the most important new features, including support for concurrency, implicitly typed variables, move semantics, variadic templates, lambda functions, and uniform initialization syntax. We also looked at some new features in the standard library.


Show Notes

Links:

Join the discussion
21 comments
  • I am self learner when it comes to programming and I started with C++. I spent so much time learning. But it was worth it. C++ is such a brutal language. It is like swiss army knife with hundreds of tools which can be super sharp tools and shot-your-foot-guns at the same time. However some of the ideas are timeless. I wish Java had tuples, even without variadic templates you could do them in Scala way using type lists. Template metaprogramming is such an strong concept… Maybe sometime there will be higher level OOP language with possibilities of C++ and ease of use of e.g. Java…

  • I haven’t used C++ in many years but as a Scott Myers fan (his books’ organization style was revolutionary), I enjoyed hearing about what is going on. A great example of SE Radio’s usefulness.

  • I have to say it was a great show. As usual Markus! Well, I never complain 😉

    I am heavily using the boost C++ Lib and, which has some of the 0x features already implemented. Sometimes not very user friendly, because of the limited capabilities of the C++ Compiler. I guess this was one of the driving forces for the new standard (variadic templates for example does help a lot). But there is one thing with C++ which is not really clearly shown to most people:

    C++ does have a compile time language/type system and a run time language/type system. The compile time language is kind of a functional language, and most of the new features are based on that. Whereas the runtime language is an imperative language. The combination is something which does confuse people – myself included – quit a bit.

    I personally always try to seperate them in my mind and think of the compile time language as an embedded generative DSL.
    For debugging a DSL – or better say the underlaying transformer/generator – I normally check its output. And by doing multipe simple steps and checking their results, I see where things go wrong.

    That’s exactly where I get in trouble with the current C++ system. I currently have a linker error (it really is 1 error) with two lines, each about 20000 characters length. Filled with nested templates.

    Scott: Is there any work done to get a better error message from the compiler in such a case? I guess a human readable output generated on the level the error occured – including the linker – is absolutely neccessary to work with that, otherwise really good stuff.

    Heinz

  • Awesome!

    I have experience in embedded, real-time system, working mainly in C++. I’ve been working with a few C-derived languages too, such as Java, C# and Objective-C. None of them has the expressive power of C++ and C++ has so much to offer. For example, operator overloading and the STL are a joy to work with, despite STL’s cryptic error messages. I found C++ a perfect language for exploring new concepts in programming: traits, static checking, template meta-programming, function objects are just a few concepts I’ve discovered lately.

    On the — side, C++ puts a lot of burdens on its users. Take header files as an example: Java and C# dropped them, c++ retained them. header inclusion can cause dependencies nightmares. In addition, C++ syntax is quite subtle and complex (where do I put those const and volatile modifiers again?). Fortunately, ‘smarter’ IDE’s come to the rescue and let software designers to focus on the solution, not chasing missing keywords.

    C++ remains my favorite. How about a new edition of “Effective C++ 0x”, Scott?

    Cheers!

    Yves

  • C++ is awsome, like a swiss army chain saw. It now has lots more cool use full features that can allow you to write more elegent code, more quickly.

    The only problem I have with C++ is the size, and the belef that it is just C with a few bits added. We find it nearly imposable to hire people that know C++; It is easy to find people that say they know it, but don’t. I have only met a 3 or 4 people who know this language ( none 100% ).

    In future projects we are going to use Eiffel, it has the power of C++ but without the complexity. It also lets you implement methods in C (or C++), so you can get control when you need it such as device drivers. But it gives you easy-to-use / powerful / safe — generics(templates), multiple inheritence, uniform access, uniform initialisation, tuples, agents (lambdas), type safe, void safe, co-variant return types, configerable garbage collection…..

  • A great interview, but with one small issue – the discussion about parameter type inference was muddled and I don’t know if Scott understood fully what was said.

    Frankly, in order to get argument type inference with a language like C++, I’m pretty sure you’d have to have structural types like O’Caml, so that the programmer and the compiler have a way of “pulling base classes out of thin air.” For example (this may be mangled):

    int foo(x) { return x * 2; }

    This would mean that the type of x is an object which has a * operator, which takes a an integer and returns an integer. Lacking concepts, I’m not sure that C++ can represent a type like that.

  • Nice, Just finished listening to the Software Engineering radio podcast interview with Scott Meyers regarding C++0x. Most of the new features made sense to me, and I am actually excited about C++0x

  • Most of the new features made sense to me, and I am actually excited. In future projects we are going to use Eiffel, it has the power of C++ but without the complexity. It also lets you implement methods in C (or C++), so you can get control when you need it such as device drivers. A great interview, but with one small issue – the discussion about parameter type inference was muddled and I don’t know if Scott understood fully what was said.

  • A great interview, but with one small issue – the discussion about parameter type inference was muddled and I don’t know if Scott understood fully what was said.

    Frankly, in order to get argument type inference with a language like C++, I’m pretty sure you’d have to have structural types like O’Caml, so that the programmer and the compiler have a way of “pulling base classes out of thin air.” For example (this may be mangled):

    int foo(x) { return x * 2; }

    This would mean that the type of x is an object which has a * operator, which takes a an integer and returns an integer. Lacking concepts, I’m not sure that C++ can represent a type like that.

More from this show