intermediate

GoingNative 38: The future of C++[17] - Updates from Lenexa--Gabriel Ha

A nice recapitulative video of what C++17 could be:

GoingNative 38: The future of C++[17] - Updates from Lenexa

by Gabriel Ha

From the video:

A few weeks ago, the ISO C++ Committee met in Lenexa, Kansas to hash out the future of the C++ language, specifically for C++17. We're honored to speak to two (previously featured) Microsoft delegates to the committee -- Gabriel "Gaby" Dos Reis and Artur Laksberg -- who took the time to give us a very nice overview of the major things that went down at the meeting!

docopt.cpp: A C++11 Port--Jared Grubb

A nice library to help you ship a program:

docopt.cpp: A C++11 Port

by Jared Grubb

From the article:

Isn't it awesome how getopt (and boost::program_options for you fancy folk!) generate help messages based on your code?! These timeless functions have been around for decades and have proven we don't need anything better, right?

Hell no! You know what's awesome? It's when the option parser is generated based on the beautiful help message that you write yourself! This way you don't need to write this stupid repeatable parser-code, and instead can write only the help message--the way you want it...

New C++ experimental feature: The tadpole operators--Raymond Chen

You should read about this amazing new feature:

New C++ experimental feature: The tadpole operators

by Raymond Chen

From the article:

How often have you had to write code like this:

x = (y + 1) % 10;
x = (y + 1) * (z - 1);
x = (wcslen(s) + 1) * sizeof(wchar_t);

Since the + and - operators have such low precedence, you end up having to parenthesize them a lot, which can lead to heavily nested code that is hard to read...

Once you have been thoroughly amazed, you should also read this article:

The tadpole operators explained

Cling Aims to Provide a High-performance C++ REPL--Sergio De Simone

Read about a REPL allowing to test things rapidly in C++:

Cling Aims to Provide a High-performance C++ REPL

by Sergio De Simone

From the article:

Cling is an interactive C++ interpreter that is built on top of LLVM and Clang and promises to provide a leap in productivity by going beyond the usual code-compile-run-debug C++ workflow...

Other useful materials:

Boost Your Productivity with Modern C++ -- June 8-12 (German), June 22-26 (English)

gottschling-seminar.PNGEarly-bird registration ends on Friday:

Boost Your Productivity with Modern C++

Leipzig, Germany

June 8-12, 2015 (German)

June 22-26, 2015 (English)

From the announcement:

Do you develop your developers?

Only when the last programmer is gone to Silicon Valley, we will realize that the digital progress won’t wait for us.

Google, Facebook, Amazon are clear examples showing that the growth of the IT market is passing by Germany. Over here, the formation of IT experts is systematically neglected. The industry is held back by the shortage of skilled programmers. Though we cannot create new developers for you, we can lift YOUR developers to the next level.

Yet in times of Big Data and Industry 4.0 the popularity of C++ remains unaffected, especially for operating systems, compilers and embedded systems. The revolutionary improvements in C++11 and C++14 brought the language further into the center of attention. For C++17, we are expecting even more spectacular progress.

Our practical training is based on the exclusive material from our tutor’s yet unpublished book on this powerful language.

The training is not a dull walk through all features of C++ but an inspiration how they can be applied with maximal efficacy. The programming language offers a wide variety of possibilities to create your own abstractions -- up to building your own embedded domain-specific language. Thereby, C++ is the only programming language allowing for such powerful abstractions while gaining maximal performance. Good C++ programming decreases the risk of errors and increases the programs' robustness. In addition, your programs will be even clearer, easier, and more attractive to your co-workers -- thus, more readable and maintainable.

Interactive exercises with practical relevance combine theory with your everyday business. We offer an intensive training in small groups with up to 10 participants in German or English. It is designed for software developers who want to develop high quality programs characterized by intuitive interfaces and maximum performance. At the end of the training, a certificate for each participants will be issued.

Trainer: Dr. Peter Gottschling is the author of the Matrix Template Library 4, co-author of Boost Graph Library as well as various other libraries. He was Head of the German delegation to the ISO Committee for the standardization of C++ and is Vice Chairman of the DIN Committee for programming languages. He has taught C++ at the Technische Universität Dresden, Technische Universität Berlin and Indiana University. Today, he is the CEO of SimuNova while working on his book "Discovering Modern C++" that will be released later this year.

C++17 Fold Expressions--Baptiste Wicht

You should read that if you want to know more about this exciting future feature of C++:

C++17 Fold Expressions

by Baptiste Wicht

From the article:

C++11 introduced variadic template to the languages. This new feature allows to write template functions and classes taking an arbitrary number of template parameters. This a feature I really like and I already used it quite a lot in my different libraries. Here is a very simple example computing the sum of the parameters:

// Good with variadics
auto old_sum(){
    return 0;
}

template<typename T1, typename... T>
auto old_sum(T1 s, T... ts){
    return s + old_sum(ts...);;
} 

// Better with fold expressions
template<typename... T>
auto fold_sum_1(T... s){
    return (... + s);
}x

Mach7: Pattern Matching for C++

Here is a new library to perform pattern matching:

Mach7: Pattern Matching for C++

by Yuriy Solodkyy, Gabriel Dos Reis and Bjarne Stroustrup

From the article:

Pattern matching is an abstraction mechanism that can greatly simplify source code. Commonly, pattern matching is built into a language to provide better syntax, faster code, correctness guarantees and improved diagnostics. Mach7 is a library solution to pattern matching in C++ that maintains many of these features. All the patterns in Mach7 are user-definable, can be stored in variables, passed among functions, and allow the use of open class hierarchies...

Example:

// Fibonacci numbers
int fib(int n)
{
    var<int> m;

    Match(n)
    {
      Case(1)     return 1;
      Case(2)     return 1;
      Case(2*m)   return sqr(fib(m+1)) - sqr(fib(m-1));
      Case(2*m+1) return sqr(fib(m+1)) + sqr(fib(m));
    }
    EndMatch
}

Using Monads in C++ to Solve Constraints: 4. Refactoring--Bartosz Milewski

Time for refactoring functional code! Bartosz Milewski concludes his intriguing journey about the application of Monads in C++.

Using Monads in C++ to Solve Constraints: 4. Refactoring

by Bartosz Milewski

From the article:

In this installment I’d like to talk about something that a lot of functional programmers swear by: Functional programs are amazingly easy to factorize.

Acting In C++--Anthony DaSilva Jr

You will find here an article about:

Acting In C++

by Anthony DaSilva Jr

From the article:

Because they’re a perfect fit for mega-core processors and they’re safer and more enjoyable to program than raw, multi-threaded, systems, I’ve been a fan of Actor-based concurrent systems ever since I experimented with Erlang and Akka (via its Java API). Thus, as a C++ programmer, I was excited to discover the “C++ Actor Framework” (CAF). Like the Akka toolkit/runtime, the CAF is based on the design of the longest living, proven, production-ready, pragmatic, actor-based, language that I know of – the venerable Erlang programming language...

STL Concepts and Ranges--Eric Niebler

Here is a video of Eric Niebler presenting a future C++:

STL Concepts and Ranges

by Eric Niebler

From the video:

With concepts and ranges coming, big changes are in store for the Standard Library and for the style of idiomatic C++. The effort to redefine the Standard Library is picking up pace. Come hear about one potential future from one of the key people driving the change. In this talk, Eric works through a tricky example and shows an elegant solution rooted both in yesterday's STL and tomorrow's. He will speak briefly about where we are in the process to reinvent and reinvigorate the Standard Library.