July 2022

C++20 Ranges Algorithms - sorting, sets, other and C++23 updates--Bartlomiej Filipek

The series continue.

C++20 Ranges Algorithms - sorting, sets, other and C++23 updates

by Bartlomiej Filipek

From the article:

This article is the third and the last one in the mini-series about ranges algorithms. We’ll look at some sorting, searching, and remaining algorithms. We’ll also have a glimpse of cool C++23 improvements in this area.

Let’s go...

Law of Demeter: A Practical Guide to Loose Coupling - Kris Jusiak - CppCon 2021

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Law of Demeter: A Practical Guide to Loose Coupling

by Kris Jusiak

Summary of the video:

In this practical session, we will go through examples that follow and/or violate the Law of Demeter principle (LoD) [1].

We will take a deep dive into what kind of design issues that exposes and how to fix them.
Additionally, we will focus on the testing aspect of following the LoD principle together with Single Responsibility and Dependency Inversion principles.

At the end of this session, the audience will have a better understanding of how to write a loosely coupled code, how to easily test it and why the Law of Demeter principle is so important in Software Design.

Let's !"only talk to our immediate friends" at CppCon-2021!

vcpkg June 2022 Release is Now Available: Force Download vcpkg Dependencies...--Augustin Popa

Are you using it?

vcpkg June 2022 Release is Now Available: Force Download vcpkg Dependencies, Documentation Changes, and More

by Augustin Popa

From the article:

The June 2022 release of the vcpkg package manager is available. This includes a hotfix that fixed a regression in the binary caching experience. This blog post summarizes changes from May 11th, 2022 to June 15th, 2022 for the microsoft/vcpkg and microsoft/vcpkg-tool GitHub repos...

CppCon 2022 plenary talk: C++ Complexity, the Subtle Culprits

A CppCon 2022 talk has been announced:

Herb Sutter live in person at CppCon 2022

From the announcement:

C++ Complexity: The Subtle Culprits ("Simplifying C++" #9 of N)

“What makes C++ so complex, and what can we do about it?” In past talks, Herb has already done deep dives on most of the major causes of C++’s complexity and potential directions for solutions.

In this brand-new talk, we delve into the “long tail” of subtle culprits… many of which turn out to be related by a common theme...

The CppCon 2022 Early Bird registration discount is available until Friday -- register now to attend on-site or on-line (both will get this talk).

 

Reminder: CppCon 2022 Early Bird ends Friday

In just 60 days, CppCon 2022 will start with Bjarne Stroustrup's opening keynote!

If you're interested in savings, the Early Bird discount for on-line and on-site tickets is available until this Friday, July 15. After that tickets will still be available right up to the conference, but at the full ticket price.

To register for CppCon 2022, click this link.

For details of on-line and on-site tickets, see the Registration page which includes information about student registration discounts, group rates, the CppCon Academy, the Diversity Dinner, the "Meet the Presenters" banquet, and much more!

Implementing C++ Modules: Lessons Learned... - Cameron DaCamara & Gabriel Dos Reis - Cppcon 2021

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Implementing C++ Modules: Lessons Learned, Lessons Abandoned

by Cameron DaCamara & Gabriel Dos Reis

Summary of the video:

C++ Modules were designed to bring more safety to your programs, while dramatically reducing compile time, resulting in overall increased productivity. How can your C++ toolchain meet this challenge? What can you do to take advantage of these new functionalities available in your toolbox? In this talk, we share lessons learned from implementing Modules based on the singular idea of providing robust support through the entire toolchain (from the lexer through the linker, the IDE, the build system, etc.), debunking the misconception that C++ Modules are just some syntactic sugar that is compiled away by the front-end. The challenges that any C++ compiler implementer faces include: (1) how to satisfy the requirements of merging materialization of declarations -- needed for sound handling of the global module fragments, in particular, as found in header files and header units – with associated performance cost; (2) how to take advantage of the One Definition Rule guarantees provided by named modules. They must address those challenges without compromising efficiency and static semantics. These lessons are valuable not just to C++ tools developers, but to ordinary C++ programmers as well, shedding light on how speed and safety gains are achieved by staying close to the spirit of the original C++ Modules design (“take the ODR as foundational”), and how you can put them to good use in the architecture of your programs and libraries.

Overload journal 169 - June 2022

The new Overload is out.

Overload journal 169 - June 2022

In the journal:

What Happened to Demo 13?
By Frances Buontempo
Making mistakes and forgetting are facts of life. Frances Buontempo tries to find ways to tackle this.

Performance Considered Essential
By Lucian Radu Teodorescu
We know that performance is important. Lucian Radu Teodorescu argues that it is actually the most important thing.

Compile-time Wordle in c++20
By Vittorio Romeo
Wordle is everywhere. Vittorio Romeo introduces wordlexpr, using compiler error messages to play the game.

ACCU 2022 Trip Reports
By Phil Nash and Dom Davis and Hannah Dee and Timur Doumler
The ACCU conference returned in hybrid mode this year. Several writers share their experiences.

Afterwood
By Chris Oldwood
Threads can mean many things. Chris Oldwood pulls a few to see what happens.

Design Patterns VS Design Principles: Factory method--Jonathan Boccara

Design decisions.

Design Patterns VS Design Principles: Factory method

by Jonathan Boccara

From the article:

Let’s examine another design pattern in our “Design Patterns VS Design Principles” series, where we relate design patterns to design principles. Today, we focus on the Factory method design pattern.

We’ll see the various forms the Factory method design pattern can take, the differences with the Abstract Factory method, and to which design principle the Factory method pattern relates to...

Faster, Easier, Simpler Vectors - David Stone - CppCon 2021

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Faster, Easier, Simpler Vectors

by David Stone

Summary of the video:

The standard library has the type `std::vector`. It is used ubiquitously as a high-performance container. However, it was standardized in the mid 90s and C++ has seen many changes since then. It has been extended with allocators, move semantics, initializer_list, and much more. Can we do better?

We can. It is possible to write a container and a set of algorithms that are more efficient at run time, have simpler implementations, and have easier, more intuitive APIs. Not only that, but we can also make it easy for users to write their own vector-like containers that make slightly different trade-offs for when you need even more performance, and this presentation includes discussion of several such vectors.

We will go through specific examples of these vector-like types and the algorithms that operate on them, and then take from that general principles of software design. We'll look into how we're limited in what we can do by C++ as it exists today and what up-and-coming proposals can make things even better.