Design Patterns in Modern C++20: Reusable Approaches for Object-Oriented Software Design
by Dmitri Nesteruk
Part IIIBehavioral
When most people hear about behavioral patterns, it’s primarily mentioned in the field of psychology, and the idea of getting people or animals to do what you want. Well, in a way, all of coding is about programs doing what you want, so behavioral software design patterns cover a very wide range of behaviors that are, nonetheless, quite common in programming.
As an example, consider the domain of software engineering. We have languages that are compiled, which involves lexing, parsing, and a million other things (the Interpreter pattern) and, having constructed an abstract syntax tree (AST) for a program, we might want to analyze the program for possible bugs (the Visitor pattern). All of these are behaviors that are ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access