Loading…
CppCon 2021 has ended
Tuesday, October 26 • 12:30pm - 1:30pm
Software Architecture Lessons from Multidimensional Spaces Explorations

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
This session is part of the Software Design Track.

Designing software can be fun, but designing good, clean, reliable, and rock-solid libraries can be of incredible complexity. In this talk we will explore what lessons can be learned on software architecture and domain specific languages design from an exploration around multidimensional arrays and linear algebra. The goal will be to review some guiding principles for good software design in C++20 and discuss programming strategies to attack the problem of compositionality. This talk will aim at shedding a new light on issues that go far beyond the sole scope of multidimensional arrays and will provide insights about the difficulty of achieving simplicity in software design.

We will start from the problem of making multidimensional arrays finally available in C++ and quickly describe the current state of affairs with std::mdspan. We will then try to understand what fundamentally makes the problem so much more complicated in C++ than in many other programming languages that have been equipped with such abstractions for decades. This will let us introduce the so-called GPE principle "Genericity, Performance, and Expressivity" as a way to frame software architecture problems. We will illustrate how this principle can be used as a guide to improve the current design of std::mdspan once combined with new C++20 capabilities ranging from generic Non-Type Template Parameters (NTTPs) to concepts and including generic lambdas in unevaluated contexts. This example will help us understand when and how advanced programming techniques can be used to implement generic, expressive, and performance-oriented abstractions. We will then extend the reflection to the design of Embedded Domain Specific Languages (EDSLs). We will see why shifting the focus from the functionality and implementation to the user perspective can be a particularly relevant strategy for the design of embedded mini-languages. We will illustrate how this principle can be translated in practice in C++20, especially in the context of generic NTTPs that allow template classes to be literally used as mini-compilers. Regarding our specific example, we will see how advanced C++20 constructs can be leveraged to allow library users to manipulate multidimensional arrays through a natural, concise, and expressive syntax. This will finally bring us to upcoming C++ features such as reflection that we will discuss from the perspective of questions about the nature of complexity in programming languages.

In short, beyond multidimensional arrays, Embedded Domain Specific Languages, and advanced implementation strategies, this talk will try to provide an interesting perspective on modern software architecture principles as well as a discussion on complexity, simplicity, and compositionality in the context of C++20.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Vincent Reverdy

Vincent Reverdy

Researcher, CNRS
Vincent Reverdy is a Full Researcher in Computer Science and Astrophysics at French Center for Scientific Research (CRNS) and located at the Annecy Laboratory for Particle Physics (LAPP) in the French Alps. He also is a member of the French delegation to the C++ Standards Committee... Read More →


Tuesday October 26, 2021 12:30pm - 1:30pm MDT