Tasks in the form of promises and futures have in C++11 an ambivalent reputation. At on hand, they are a lot easier to use than threads or condition variables; at the other hand, they have a great deficiency. They can not composed. C++20 will overcome this deficiency.
C++20 will have atomic smart pointers. To be exactly, we will get a std::atomic_shared_ptr and a std::atomic_weak_ptr. But why? std::shared_ptr and std::weak_ptr are already thread-safe. Sort of. Let me dive into the details.
Forecasts about the future are difficult. In particular, when they are about C++20. Nevertheless, I will take a look into the crystal ball and will write in the next posts about, what we will get with C++17 and we can hope for with C++20.
Monads in C++? What a strange name for a post. But it's not so strange. With std::optional C++17 gets a monad. The ranges library from Eric Niebler and the extended futures are also monads. For both, we can hope for in C++20.
We stay in the year 2020. We will get with high probability concepts. Of course, waterproof statements about the future are difficult but the statement is from Bjarne Stroustrup (Meeting C++ 2016 at Berlin).
A small time jump and we are in the year 2020. C++ will get - as far as the future is predictable - the new ranges library. Thanks to Eric Nieblers library, the working with the Standard Template Library (STL) will become much more comfortable and powerful.
Which functional feature can we expect with C++17, for which functional feature can we hope for with C++20? Exactly this question will I concisely answer in this post.
Currently are 25 guests and no members online