Discovering Observers - Part 1 -- Sandor Dargo
The goal of this mini-series is to explore the Observer Design Pattern in C++, walking through different implementations and weighing their pros and cons.
Discovering Observers - Part 1
by Sandor Dargo
From the article:
First, let’s briefly recap what the observer pattern is. It belongs to the family of behavioral design patterns.
As a reminder: design patterns are usually grouped into three categories: creational, structural, and behavioral.
You might also have encountered the observer under other names such as listener, event subscriber, or publisher-subscriber.
The central idea is simple: instead of repeatedly querying an object for information, the querying object (the observer) gets notified automatically when the information holder (the subject) changes. For example, imagine an orchestrator object that needs the latest value of a user setting. Instead of polling the setting every
nmilliseconds, it can subscribe to value changes and receive notifications whenever a new value is set.Using the common terminology: there is typically one publisher and one or more subscribers. Subscribers register for events or changes, and whenever an update happens, the publisher notifies them.

A long-delayed dream finally came true: after years of near-misses and lessons learned (“better to be invited than sent”), I made it to CppCon—and it was bigger, louder, and more inspiring than I imagined. In this recap I share the vibe of the week, five standout talks and ideas, a few notes from my own session, and links to recordings as they appear.
Structured binding is a C++17 feature that allows you to bind multiple variables to the elements of a structured object, such as a tuple or struct. This can make your code more concise and easier to read, especially when working with complex data structures. On this blog, we already covered this functionality, but we’ll talk about some good C++26 additions and real code use cases.