Home > Speakers >

Ben Saks

Ben Saks is the chief engineer of Saks & Associates, which offers training and consulting in C and C++ and their use in developing embedded systems. Ben has represented Saks & Associates on the ISO C++ Standards committee as well as two of the committee’s study groups: SG14 (low-latency) and SG20 (education). He has spoken at industry conferences, including the C++ and System Software Summit, the Embedded Systems Conference, NDC Techtown, and CppCon, where he’s also chair of the Embedded Track and a member of the program committee. Ben previously worked as a software engineer for Vorne Industries, where he used C++ and JavaScript to develop embedded systems that help improve manufacturing productivity in factories all over the world. He’s also a contributing author on multiple Vorne patents.

Modern C++ Interface Design

Status: Available Now

Prerequisite: Solid knowledge of C, C++ classes, and traditional C enumeration types, as well as a basic understanding of simple C++ templates.

Good interface design is an important part of writing safe, reliable software. By writing interfaces that are easy to use correctly, we let software engineers communicate clearly and reduce maintenance costs. By using the type system to write interfaces that are hard to use incorrectly, we can catch many potential errors at compile time and improve development time.

In this session, we’ll take an existing C++ interface and look at how we can improve on it using Modern C++ features. We’ll see how Modern C++ lets you write enumeration types that avoid common problems and misuses. We’ll discuss new library types and language features that help you write interfaces with more convenient parameter passing and return conventions. We’ll also examine how you can use C++ attributes like [[nodiscard]] to get more feedback from your compiler and catch mistakes earlier in development.

  • scoped enumerations and underlying type specifiers
  • explicit conversion operators
  • attributes (e.g., [[deprecated]], [[nodiscard]], [[fallthrough]], etc.)
  • structured bindings
  • std::optional
  • std::expected

Go to Session


Compile-Time Programming in C++ Using Constexpr

Status: Available Now

Prerequisite: Solid knowledge of the C, as well as the fundamentals of C++ classes, constructors, and the const qualifier.

C++’s constexpr qualifier is a powerful tool for writing “constant expressions” — that is, expressions that can be computed at compile time. These constant expressions have several advantages over non-constant expressions, particularly for embedded systems. Objects with values that are constant expressions can be placed in ROM (read-only memory), and can be used as array dimensions, case labels, and enumerator initializers. Moreover, code that uses constant expressions is generally smaller and faster than similar code that uses non-constant expressions.

In this session, we’ll look at how you can use the constexpr qualifier to write functions that yield constant expressions. We’ll examine the differences between const and constexpr objects and see why const objects don’t necessarily qualify as constant expressions. We’ll also discuss the related C++20 keywords consteval and constinit and see how they fit into the picture.

This session covers:

  • A review of the fundamentals of const
  • constexpr functions
  • constexpr objects
  • consteval functions
  • constinit objects

Go to Session


Live Q&A - Compile-Time Programming in C++ Using Constexpr

Status: Available Now

Live Q&A with Ben Saks for the talk titled Compile-Time Programming in C++ Using Constexpr

Go to Session