Urbana Proposals - C++17 insight?

I've started with my series on the proposals for the next C++ Committee Meeting:

Urbana Proposals - C++17 insight?

by Jens Weller

From the article:

A short series to give you an overview over the Papers submitted in the latest mailing for the C++ Committee Meeting in Urbana-Champaign in Illinois. At the beginning of November the C++ Committee will have its 3rd Meeting this year. As C++14 is now finished, the focus is clearly on the upcoming C++17 standard.

A pair of articles on advanced template mechanics—Eli Bendersky and Eric Niebler

If you're a very advanced C++ developer with an appetite for template mechanics, these two articles that were posted in the past 24 hours may interest you.

Note: The vast majority of C++ developers don't need to know this, but very advanced developers will find the material and the techniques interesting.

SFINAE and enable_if

by Eli Bendersky

Customization Point Design in C++11 and Beyond

by Eric Niebler

Ranges in C++: Counted Iterables and Efficiency—Eric Niebler

New in Eric's series on ranges for C++:

Ranges in C++: Counted Iterables and Efficiency

by Eric Niebler

From the article:

I’ve been hard at work fleshing out my range library and writing a proposal to get range support into the standard. That proposal describes a foundational range concept: Iterable. An Iterable is anything we can pass to std::begin() and std::end() to get an Iterator/Sentinel pair. Sentinels, as I described here earlier this year, make it possible for the Iterable concept to efficiently describe other kinds of ranges besides iterator pairs.

The three types of ranges that we would like the Iterable concept to be able to efficiently model are:

  • Two iterators
  • An iterator and a predicate
  • An iterator and a count
The Iterator/Sentinel abstraction is what makes it possible for the algorithms to handle these three cases with uniform syntax. However, as Sean Parent pointed out here, the third option presents challenges when trying to make some algorithms optimally efficient. Back in February, when Sean offered his criticism, I promised to follow up with a blog post that justified the design. This is that post.

A video interview with Michael Wong

At C++Now this and last year I recorded a short interview with Michael Wong:

A video interview with Michael Wong

The interview as a youtube playlist

by Jens Weller

From the Article:

I've started last year a video interview in Aspen - while at C++Now - with Michael Wong. This year I had the chance to finish the interview and I am now finally able to release it. Michael is a member of the C++ Committee for many years, he leads the Canadian delegation and also speaks for IBM at the C++ committee.

Generator functions in C++—Paolo Severini

Paolo Severini expands the concept of resumable functions to support generator functions, providing the ability of lazily producing the values in a sequence only when they are needed.

Generator functions in C++

by Paolo Severini

From the article:

In the previous post we had a look at the proposal of introducing resumable functions into the C++ standard to support writing asynchronous code modeled on the C# async/await pattern.

We saw that it is already possible to experiment with the future resumable and await keywords in Visual Studio, by installing the latest November 2013 CTP. But the concept of resumable functions is not limited to asynchrony; in this post we’ll see how it can be expanded to support generator functions.

Generator functions and lazy evaluation

In several languages, like C# and Python, generator functions provide the ability of lazily producing the values in a sequence only when they are needed. ...

CppCon: My Proposed Talks (Part 2)—Herb Sutter

cppcon-108.PNGFollowing up on Herb's three talk proposals posted yesterday, the other two titles and abstracts are now posted, this time of new talks (note: again, pending review and selection by the program committee, so this is not final -- they may or may not be selected if there is stronger material).

CppCon: My Proposed Talks (Part 2)

by Herb Sutter

From the post:

GC for C++, and C++ for GC: “Right” and “Wrong” Ways to Add Garbage Collection to C++ (1 to 2 hours)

"Garbage collection is essential to modern programming!" "Garbage collection is silly, who needs it!"

As is usual with extremes, both of these statements are wrong. Garbage collection (GC) is not needed for most C++ programs; we're very happy with determinism and smart pointers, and GC is absolutely penalizing when overused, especially as a default (or, shudder, only) memory allocator. However, the truth is that GC is also important to certain high-performance and highly-concurrent data structures, because it helps solve advanced lock-free problems like the ABA problem better than workarounds like hazard pointers.

This talk presents thoughts about how GC can be added well to C++, directly complementing (not competing with) C++'s existing strengths and demonstrating why, as Stroustrup says, "C++ is the best language for garbage collection."


Addressing C++’s #1 Problem: Defining a C++ ABI (1 hour)

"Why can't I share C++ libraries even between my own internal teams without using the identical compiler and switch settings?" "Why are operating system APIs written in unsafe C, instead of C++?" "Why can’t I use std::string in a public shared library interface; it's the C++ string, isn't it?!"

These and more perennial questions are caused by the same underlying problem: For various historical reasons, C++ does not have a standard binary interface, or ABI. Partial solutions exist, from the Itanium ABI which addresses only the language and only on some platforms, to COM and CORBA which do both less and far more than is needed.

It is deeply ironic that there actually is a way to write an API in C++ so that it has a de facto stable binary ABI on every platform: extern "C".

This session describes current work driven by the presenter to develop a standard C++ ABI. This does not mean having identical binaries on all platforms. It does mean tackling all of the above problems, including directly addressing the #1 valid reason to use C instead of C++, and removing a major obstacle to sharing binary C++ libraries in a modern way.

Range Comprehensions—Eric Niebler

Do you "comprehend" ranges? From a key participant in some of the latest discussion about ranges for C++:

Range Comprehensions

by Eric Niebler

From the article:

I’ve been busy since I last wrote about ranges. I have a lot of news to share, but in this post, I’m going to narrowly focus on a recent development that has me very excited. It’s a new feature that I’m calling range comprehensions, and they promise to greatly simplify the business of creating custom ranges...

Async-Await in C++—Paolo Severini

severini-await.PNGParis, April 2014: Paolo Severini explores the Async-Await pattern and the related proposal for C++17, showing also an example by using Visual Studio 2013 November CTP.

Async-Await in C++

by Paolo Severini

From the article:

... what about native [C++] programming? Is there anything like async/await that we can use with our futures? We can find the answer in N3858, another proposal made by Gustafsson et al. for C++17.

This time the changes proposed are to the language itself and not just to the library. The idea is to introduce the equivalent of C# async methods in the form of resumable functions. They can be thought as the basis to add to C++ the support for real co-routines, and are not strictly related to the <future> library, even though they have being defined especially to improve the usability of futures and promises...