community

Expressive Code for State Machines in C++--Valentin Tolmer

Compiler checks are the best!

Expressive Code for State Machines in C++

by Valentin Tolmer

From the article:

Have you ever run into this kind of comments?

// IMPORTANT: Do not call this function before calling SetUp()!

Or checks like these:

if (my_field_.empty()) abort();

Those are all symptoms of a (often light-weight) protocol that our code must respect. Or sometimes, you have an explicit protocol that you’re following, such as in the implementation of an SSL handshake or other business logic. Or maybe you have an explicit state machine in your code, with the transitions checked each time against a list of possible transitions.

Let’s have a look at how we can expressively handle these cases...

CppCon 2019: De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable--Herb Sutter

What do you think about it?

De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable

by Herb Sutter

From the video:

A fundamental reason why C++ is successful and loved is its adherence to Stroustrup’s zero-overhead principle: You don’t pay for what you don’t use, and if you do use a feature you can’t reasonably code it better by hand. In the C++ language itself, there are only two features that violate the zero-overhead principle, exception handling and RTTI – and, unsurprisingly, these are also the only two C++ language features that every C++ compiler has switches to turn off and that are regularly discouraged or even banned. This matters because not using these features is the largest current cause of fragmentation of the C++ community into incompatible dialects, and the cause of recurring problems including type confusion security vulnerabilities arising from “didn’t down-cast using dynamic_cast because that would be too slow.” This talk is about ongoing long-term efforts to try to unify the community in this area, not by replacing exceptions and RTTI, but by doubling down: fully embracing exceptions and RTTI, and improving them so they can be zero-overhead too.

CppCon 2019: Better Code: Relationships--Sean Parent

More are coming!

Better Code: Relationships

by Sean Parent

From the video:

Computer scientists are bad at relationships. Nearly every program crash is rooted in a mismanaged relationship, yet we spend most of our time discussing types and functions and not the relationships connecting them together. This talk looks at common ways data and code are connected in an application, how those relationships are typically represented, and the problems caused by the use, and misuse of these paradigms. Then we'll look at ways to model these relationships in C++ and use them to build correct applications.

CppCon 2019: Speed Is Found In The Minds of People--Andrei Alexandrescu

The first videos are arriving!

Speed Is Found In The Minds of People

by Andrei Alexandrescu

From the video:

In all likelihood, sorting is one of the most researched classes of algorithms. It is a fundamental task in Computer Science, both on its own and as a step in other algorithms. Efficient algorithms for sorting and searching are now taught in core undergraduate classes. Are they at their best, or is there more blood to squeeze from that stone? This talk will explore a few less known – but more allegro! – variants of classic sorting algorithms. And as they say, the road matters more than the destination. Along the way, we'll encounter many wondrous surprises and we'll learn how to cope with the puzzling behavior of modern complex architectures.

Back to Basics at CppCon 2019

It started!

Back to Basics at CppCon 2019

by Arthur O’Dwyer

From the article:

Tomorrow I’ll be flying out to Denver, Colorado, for CppCon 2019. This will be my busiest CppCon yet! Besides giving my “STL From Scratch” weekend course for the third year in a row, this year I’m also the chair of CppCon’s new “Back to Basics” track...