Tech Off Thread

10 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Andrei, Herb and Scott: Got C++11 Questions?

Back to Forum: Tech Off
  • User profile image
    Charles

    Folks,

    I'm attending C++ and Beyond next week (Aug 5-8, 2012) and will be bringing my camera gear. I'd like to invite you to ask questions (C++11, specifically) for Andrei Alexandrescu, Herb Sutter and Scott Meyer to answer. Like last year, I will be interviewing the Big Three and want to include you! Please ask questions here and I will do my best to get them answered.

  • User profile image
    tomkirbygre​en

    If we leave the syntax alone for the next couple of years, how long before we can get an official library Technical Report out there with types covering XML, hierarchical file systems and HTTP / web-services?

  • User profile image
    B3NT

    I'm really looking forward to the videos. How about a windows specific question? Is there any chance that we could see some guidance on how to use the new language features and the standard library to interop with Win32. The MSDN samples look like a completely different language compared to C++11.

     

     

  • User profile image
    ZippyV

    I think Herb asked developers awhile ago about suggestions on which high-level features should be supported in a standard library. What has the response been? Any unexpected requests?

  • User profile image
    Charles

    Great! Keep them coming Smiley

    Thanks,
    C

  • User profile image
    peterchen

    Build Model. 

    Are there any ideas or even plans  to improve? 

    I see it as the biggest issue in C++ for large projects. 

    The separation of header and body is purely to "make the tool chain happy". A typical header contains both interface and implementation details  -  to avoid that I have to write more code.  The separaton is awkward from a software design POV. Header-only code lacks certain features (static variables), and is suitable only for stable libraries, as incremental build times usually suffer massively. 

    #include's go stale after ever so many refactorings, unused #includes are hard to identify, creating a spaghetti bowl of fake dependencies that are hard to understand and harm incremental build times - which in turn harms the entiredevelopment process. Slow turnaround means slow tests means tests are run less often. Large projects often suffer from bugs / shortcomings of the dependency check, triggering full builds "just to be sure".  

    Moooar hardware, forward declarations, precompiled headers and PIMPL can mitigate the problems only up to a point.  The latter makes me particulary uneasy: solving a tool chain problem by changing the way I write code.

     

    Anyway, looking forward to the talk!

  • User profile image
    Matt_PD

    I've got a question regarding a (future, potential) metaprogramming facility -- namely, a possibility of standardizing static loops. It might go hand in hand with adding static conditional expressions (like the proposed static_if) to the future versions of the standard.

    The practical (example) context is Section 15 Metaprogramming of the Agner's optimization manual, "Optimizing software in C++: An optimization guide for Windows, Linux and Mac platforms", see http://www.agner.org/optimize/optimizing_cpp.pdf & http://www.agner.org/optimize/#manuals.

    In particular, it discusses examples that "explain how metaprogramming can be used to speed up the calculation of the power function when the exponent is an integer known at compile time."

    "In C++ template metaprogramming, loops are implemented as recursive templates.

    [...]

    Why is template metaprogramming so complicated? Because the C++ template feature was
    never designed for this purpose. It just happened to be possible.

    [...]

    The D language allows compile-time if statements (called static if), but no compile-
    time loops. We can only hope that such a feature becomes available in the future. If a future
    version of C++ should allow compile-time if and compile-time while loops, then the
    transformation of example 15.1b to metaprogramming would be straightforward. The MASM
    assembly language has full metaprogramming features, including the ability to define
    function names and variable names from string functions. A metaprogramming
    implementation analogous to example 15.1b and d in assembly language is provided as an
    example in the "Macro loops" chapter in manual 2: "Optimizing subroutines in assembly
    language"."

    Right now we can (awkwardly) implement conditionals using template specialization and loops using recursive template instantiation.
    I understand the proposed static_if facility is intended to avoid the awkwardness in the case of the compile-time if statements.
    Would it be possible for the next revision of the standard to get an analogous (as described above) compile-time loops extension?

  • User profile image
    felix9

    OK. Now crank out MP4s and WMVs and upload them please ! Devil

  • User profile image
    Charles

    @felix9: Interview will go live next week. Thanks to all for the questions. We didn't get to all of them, but did get into some very good stuff! Smiley

    C

  • User profile image
    Charles

    Here it is: http://channel9.msdn.com/Shows/Going+Deep/Alexandrescu-Meyers-Sutter-On-Static-If-C11-in-2012-Modern-Libraries-and-Metaprogramming

    Thanks for the great questions! (Sorry we didn't get to them all - we ran out of time!)

    C

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.