Bjarne Stroustrup

C++ in constrained environments

Think modern C++ is too heavy for embedded systems? This talk proves how new features can actually improve performance and safety in constrained environments.

C++ in constrained environments
#1about 5 minutes

Debunking common myths about C++ in constrained systems

Common misconceptions, such as needing to learn C first or that using a C-style subset is most efficient, are addressed to set the stage for modern C++ practices.

#2about 6 minutes

The onion principle and the C++ memory model

Design code using the onion principle by starting with clean, high-level interfaces and only peeling back layers of abstraction when performance tuning is necessary.

#3about 3 minutes

Understanding resource management with RAII

Resource management is the key to reliable C++, using constructors for acquisition and destructors for predictable, automatic release of resources like memory or threads.

#4about 8 minutes

Using modern language features for safer code

Replace unsafe, low-level constructs like unions and pointer-size pairs with safer, more expressive alternatives like `std::variant` and `std::span`.

#5about 7 minutes

Shifting computation from runtime to compile time

Improve performance and correctness by moving computations to compile time using `constexpr` functions, move semantics, and libraries like `std::chrono`.

#6about 6 minutes

Applying the C++ Core Guidelines for safety

The C++ Core Guidelines provide a framework for writing modern, safe code by starting with the full language and using libraries to encapsulate and restrict unsafe features.

#7about 12 minutes

Choosing the right error handling strategy

Adopt a clear policy for error handling by using error codes for expected, local failures and exceptions for rare, non-local errors that require a guaranteed handler.

#8about 6 minutes

Writing safe concurrent code and avoiding data races

Avoid undefined behavior from data races in concurrent code by using the C++ memory model, atomics for synchronization, and higher-level abstractions like threads and locks.

#9about 7 minutes

Q&A on local error handling and C++23 features

The speaker answers audience questions about testing for locally handled errors and discusses the expected features and delays for the C++23 standard.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles
DC
Daniel Cranney
Dev Digest 188: CfP time, the risks of NPM and IKEA algorithms
Inside last week’s Dev Digest 188 . 🤖 GitHub Copilot CLI is now in public review 💻 Microsoft is bringing ‘vibe working’ to office apps 🎣 Attackers abuse AI tools to generate captchas in fishing attacks ⚠️ When LLMs autonomously attack 🧠 Common cause...
Dev Digest 188: CfP time, the risks of NPM and IKEA algorithms
CH
Chris Heilmann
All the videos of Halfstack London 2024!
Last month was Halfstack London, a conference about the web, JavaScript and half a dozen other things. We were there to deliver a talk, but also to record all the sessions and we're happy to share them with you. It took a bit as we had to wait for th...
All the videos of Halfstack London 2024!
BR
Benjamin Ruschin
What Developers Really Need to Create Great Code Demos
Every developer on earth has, at some point, had another developer to thank for a breakthrough, a success, an aha moment they wouldn’t have had without coming across that blog post, that open-source contribution, that reply on socials or that humble ...
What Developers Really Need to Create Great Code Demos

From learning to earning

Jobs that call for the skills explored in this talk.

Rust and GoLang

Rust and GoLang

NHe4a GmbH
Karlsruhe, Germany

Remote
55-65K
Intermediate
Senior
Go
Rust
C++ Software Engineer

C++ Software Engineer

Rebel Talent
Municipality of San Cristóbal de La Laguna, Spain

QT
C++
GIT
CMake
DevOps
+3