Hinweis: Die aktuelle OOP-Konferenz finden Sie hier!

Konferenzprogramm

Die im Konferenzprogramm der OOP 2022 Digital angegebenen Uhrzeiten entsprechen der Central European Time (CET).

Unser Programm gibt es auch als praktische PDF-Datei >>Zum Download

Modern C++ Design for Safe and Embedded Systems

This tutorial will demystify some of C++ complexities by showing clear guidelines to simpler use of specific language features for designing functions and types of your system. From the experience in specifying new MISRA C++ guidelines the author will show how to write safer C++ for embedded and other systems.

Learning goals consist of

  • designing function interfaces: parameter passing styles and error reporting
  • employ strong typing for better domain values
  • conscious class design for resource management and hierarchies

Target Audience: Developers
Prerequisites: Practical knowledge of C++
Level: Advanced

Extended Abstract
This tutorial is trying to simplify your use of C++. We have many great rule sets to chose from, some partially outdated, like Scott Meyers 3rd edition, some futuristic, like the C++ core guidelines. While working on the AUTOSAR C++ and new MISRA C++ guidelines I found that many of the guidelines forbid things without giving actual guideline on how to do things and when to deviate.

Also many talks (mine included) on C++ explain the modern features and show how they work, but only few put things into context and show what to give up and how things combine sanely.

This full day tutorial is the result of thinking about that. It won’t show C++20 feature by feature, but gives a coherent set of practices to improve your design and code using existing standard C++ features where they give you benefits.

We will cover the following topics:

  • designing function interfaces in a way that they are easy to call correctly and hard to call incorrectly
  • how to report function contract violations (at least 5 different ones) and their individual benefits and liabilities, so you can make a conscious choice.
  • what parameter passing style and return value style works best under what conditions
  • how to create (parameter) type wrappers to avoid passing wrong arguments
  • class design for simple value wrappers to improve function interfaces
  • mix-in strategies for functionality and operators, so that creating value wrappers is simpler
  • provide an overview of class styles, e.g., value, manager, oo-bases and show how to select from the rules for special member functions
  • take a look at the lesser known C++11 feature of ref-qualified member functions and show why and when to use them for your member functions

If you are brave enough, bring your own examples that we can look at and discuss where they are perfect and where they could be improved.

Peter Sommerlad is a consultant and trainer for C++ and agile software development. He was professor and lead the Institute for Software at HSR Rapperswil. Peter is co-author of the books POSA Vol. 1 and Security Patterns and contributed to "97 things every programmer should know". Peter is an ACM Senior Member and member of ACCU, IEEE CS, and the ISO WG21( C++ ) and WG23 (vulnerabilities) committees. Peter participated in the creation of MISRA C++202x.
Peter Sommerlad
10:00 - 17:00
Vortrag: Mo 4

Vortrag Teilen