My two //build/ talks online

//build/

My two talks from last week’s //build/ conference are online.

My personal favorite is Writing Modern C++ Code: How C++ Has Evolved Over the Years. The thesis is simple: Modern ISO Standard C++ code is clean, safe, and fast. C++ has got a bad rap over the years, partly earned, but that’s history. This talk is a “welcome to modern C++” for programmers who may never have seen C++ before, or are familiar only with older and more difficult C++.

If you’re already a modern C++ developer you may be thinking, “but I do most of those things already, why is there a whole talk on this at a Microsoft conference?” Because as interest and use of Standard C++ is heating up again, it’s important to ensure that people have a good experience as they return to C++, or turn to it for the first time. Thus we sometimes have called this the “happy path” talk — designed to show the simple happy path through modern C++ that avoids needless pitfalls.

My other talk was Using the Windows Runtime From C++. This is Windows 8-specific and talks about the “foreign object model” language extensions used by Visual C++ 11 to talk to the new native ABI-safe WinRT types. These extensions should be used sparingly, only on the thin module boundaries around otherwise nice and portable Standard C++ code, and it was necessary to add them only because Standard C++ types aren’t ABI-safe and accessible safely from other languages. (If ISO C++ were to get a module system at some point that includes being able to talk about ABI-safe types on module boundaries, that would be happiness indeed!) There is also a template library called Windows Runtime C++ Template Library (WRL) that is another way to access basically the same functionality using template syntax; pick whichever you like best.

Thanks to all who attended!

13 thoughts on “My two //build/ talks online

  1. Hello Herb,

    With regard to writing “modern C++”, what compilers currently (correctly) support the most features of the C++11 standard?

    Thank you,
    Alex.

  2. std:v:alarray is neither deprecated nor removed, but it has been updated to include move semantics. See page 884 of the standard at

    Click to access n3092.pdf

    std::array is a different beast altogether. Unlike vector and valarray, it uses stack memory rather than dynamically allocated heap memory, and the size of the array is fixed and computed at compile time (in fact, it’s part of the template type info, so the compiler will check against copying assigning arrays of different sizes).

  3. Hi Herb,

    I twitted you about this in Twitter, but probably you do not log in often there.

    The question is about C++11: Is valarray among the facilities that got deprecated? Because you talked about an “array” template at your ISO C++11 BUILD speech.

    Thank you.

  4. Intel TBB is now a superset of PPL. TBB had its own approach which Intel still supports and I think evolves, but it now also implements PPL so that PPL is available via TBB on Linux, Mac., and more.

    The official text currently on the TBB page (Details tab) is: “Intel Threading Building Blocks is validated and commercially supported on Windows*, Linux*, and Mac OS* platforms. It is also available on FreeBSD*, IA Solaris*, XBox* 360, and PowerPC-based systems via the open source community.”

  5. I just watched your first talk. Thanks for the side by side code snippets. They were very illuminating.

    My ears perked up when you said the PPL was available for linux via Intel. However, when I browsed the Intel site, I didn’t see it. Is the Intel TBB api the same as Microsoft’s PPL?

  6. Herb says in the first talk that variadic templates were almost done for VC++ 11 (or whatever the next VC++ will be called). Unfortunately, they wont be included in this release.

  7. Imagine my shock when I first loaded up VC++ in Win8, and saw that the Metro project templates appeared to be using C++/CLI. This wasn’t the native we were promised!

    I then watched your WinRT talk a couple days after, and was much more relieved. I’m still not sold 100% on C++/CX language extensions being the best solution, but it was platform-specific code to begin with so it shouldn’t be a big deal.

    Regardless of that, WinRT does seem to have some interesting functionality—the focus on async is fantastic. Metro wouldn’t make any sense, but it looks like most of WinRT could be backported to Vista/7 relatively easily. Any plans for this?

    Also, is the VC++11 preview feature complete? I was under the impression that variadic templates were in the works.

  8. Hi Herb,
    I watched your invaluable talks. I was really disappointed initially as a C++ developer to see just a few improvements on standard conformance in VC++11, but now I can understand why WinRT has been done this way. Keep up the good work with Microsoft and the C++ committee :)

  9. Hi Herb,
    thanks for your presentations. I initially have got some doubts about WinRT, and why Microsoft has chosen to extend C++! Watching your talk has been really clarifying!
    I hope the next C++ standard will include compule time reflection as Daveed Vandervoorde proposed, and a module system :)

    Keep up the good work,
    Fulvio

  10. “C++ has got a bad rap over the years…” Has it? I never heard a song about C++. :)

  11. “If ISO C++ were to get a module system at some point that includes being able to talk about ABI-safe types on module boundaries, that would be happiness indeed!”

    Would it matter? VCNext doesn’t implement much more of the C++11 language than VC10 did. Where are varadic templates? Initializer lists and uniform initialization? Delegating constructors and member initailizers? It’s amazing that VC10 was on the forefront of C++0x support with R-value references and lambdas, and yet two years later, that’s still pretty much all VCNext supports.

    Or is it that Microsoft basically picks and chooses whatever functionality they want, and we can expect that we will never see these other useful bits of functionality in VC++? Should we consider varadic templates to get the level of support that “export” got in VC (ie: none)? I’d like to know if I should keep waiting, or just bite down on switching to the horrors of Eclipse and GCC. Because as bad as developing in those environments can get, at least you can use the actual language and not some arbitrary subset.

Comments are closed.