Talk + panel online: “(Not Your Father’s) C++” + “Native Languages” Panel

imageLast week at the Lang.NEXT 2012 conference in Redmond, I gave a 40-minute C++ talk and participated on a native languages panel. Both are now online at Channel 9.

Here’s the 40-min C++ talk, taken from the C9 site:

(Not Your Father’s) C++
Herb Sutter 

What makes ISO C++11 "feel like a new language"? What things that we know about past C++ do we need to unlearn? Why is C++ designed the way it is – historically, and in C++11? Finally, what is the difference between managed and native languages anyway, and when is each applicable? This talk gives an overview and motivation of modern C++ and why it’s clean, safe, and fast – as clean to code in and as type-safe as any modern language, and more than ever the king of "fast."

And the panel (my favorite highlight is at 24:00-28:00):

Lang.NEXT 2012 Expert Panel: Native Languages
Walter Bright, Robert Griesemer, Andrei Alexandrescu, Herb Sutter

Native programming languages panel hosted by Martyn Lovell.

I hope you enjoy them.

9 thoughts on “Talk + panel online: “(Not Your Father’s) C++” + “Native Languages” Panel

  1. Lang.NEXT was a very good conference, good to see so many cool things at one place! Thanks for the speech!

  2. Nice presentation. Glad to see you touching some of the points I was discussing on the JIT blog comments.

  3. Hi Herb,

    In your talk you mention that calling languages managed/unmanaged is not a good way to classify them. I always wondered why Java or C# are called managed anyways.

    Actually, C++ should be called managed, because any resource, be it memory or some other resource, like network connections, open files etc. can be managed automatically by destructors. On the other hand, in C# and Java, you have to manually free all resources, except memory. Either by calling a destroy/close/dispose method, or adding “using” statements to all places in the code where the resource is used.

    If Java/C# are called managed should C++ then be called super-managed?

  4. @d-marc: the resource most frequently used by programs is memory. And it is also the *hardest* resource to manage.

    Managing network connections and files is child’s play. How many of those will most applications have around at any one time? 50? Maybe 200? Generally, they will be easily localized in your codebase, isolated from the rest of your code. The lifetimes will be simple and obvious; the worst you might have a problem with is error conditions.

    Most programs of any size allocate thousands of objects, who’s lifetimes are governed by complex, byzantine rules.

    That managed languages don’t manage the lifetimes of *everything* doesn’t mean that they’re not getting 95% of the cases. Compared to the 0% that C++ *guarantees*; you have to expect effort to manage the lifetime of stuff in C++ (by building RAII types, move semantics, copy semantics, etc).

  5. @jmckesson

    I have never observed what you said in real life coding. The resource least frequently to be managed directly in normal C++ programs is memory. My programs rarely use new/delete. It is also the easiest resource to manage.

    There might not be so many network connections, database connections, open files, or synchronisation locks to manage, but if you forget to release one it is much worse than a memory leak.

    Normal programs should not have to directly allocate thousands of objects with “byzantine rules” to free. If you see someone doing this teach him to use std::string, std::vector, a smart ptr etc…

    If I use a Socket class in C++, the destructor closes the connection. In application code I get a 100% guarantee without having to write any extra code. Where as in a “managed” language I have a 0% guarantee that the connection gets closed, if the programmer forgets to call a close/dispose method (with the help of a using statement if available).

    From my experience, “managed” programs are typically full of resource leaks, especially once you leave the sunshine path of execution.

  6. @d-marc

    Managed languages was a term introduced by Microsoft when .NET was created. In the early whitepapers Microsoft was calling C++ native and .NET languages managed.

    Before that there were only interpreted or compiled implementations of languages, but the managed term got stuck and nowadays everyone uses it to refer to languages, which have by default a VM implementation.

    Since most people confuse the languages with their default implementations, the managed term only adds up to confusion, on my point of view.

  7. Which C++11 features are supported only through the new Windows Runtime ?

    Martyn Lovell’s talk, slide 34 suggests that Win32 and Windows Runtime are orthogonal choices. The notes for slide 34 included the note “Optimized for writing Metro – not everything is possible”

    Does that mean that new features and idioms avialable in C++11 features are only available to support Metro Style applications, and not desktop applications written for Win32 ?

  8. I am a beginner programmer so it is very hard for me to follow all the changes to the language since I am in the beginning of my career being a computer science student. For my Computer Science II class I have to write a paper on the changes that C ++ 11 has with the new standards. I watched your video “Not your father’s c++” It had many parts that were hard for me to follow because of my limited knowledge with the language. Your presentation was amazing regardless. Even when I had no idea what you were talking about (due to my lack of knowledge again for the language) it was easy to pay attention. You are a wonderful speaker and I wish the other videos I watched online were as great as your presentation was.

Comments are closed.