What we're about
Upcoming events (1)
This month we have the great pleasure to welcome Eduardo Madrid to our user group. Together with Klaus Iglberger he will give an introduction to the Type Erasure design pattern and it's Emergent Behavior.
Eduardo is a tech lead at Snap, the maker of Snapchat. He works at the team that makes infrastructure for all of Augmented Reality. This work requires solving demanding performance challenges in easy to use libraries. He believes only C++ can give you good enough combinations of performance and software engineering ease of use, imagine applying all the things Klaus talks about, Design Patterns in particular, with blazing performance.
Speaker: Klaus Iglberger
Title: A Brief Introduction to Type Erasure
Since its invention in 2000 by Kevlin Henney, Type Erasure has become one of the most interesting and powerful design patterns in the toolbox of C++ developers. Its power has led to its adoption in several standard library classes, such as std::function, std::any and std::shared_ptr. In this talk, I will give a brief introduction to the advantages of the design pattern and how implementations can look like.
Speaker: Eduardo Madrid
Title: Type Erasure exhibits Emergent Behavior
Type Erasure exhibits Emergent Behavior
“The Combination of Design Patterns that give rise to Type Erasure exhibits emergent behavior, i.e. it allows great powers unpredictably”
Emergent behavior is when a system is complex enough that its behavior is not chaotic yet exhibits very interesting and unpredictable behavior.
C++ itself exhibits “emergent behavior”:
Templates were invented to avoid macros or copy&pasting, a type-safe replacement and ended up becoming their own programming language. Then there is the richness of C++’s type system (overloads, template specializations), which gave rise to a “Turing complete” meta language; and the invention of the Generic Programming Paradigm. Things that were never intended or even predicted in the original design of these features!
This presentation is about performance, modeling powers and programming techniques that arose much further from anything I had anticipated from Type Erasure when I began implementing the zoo framework. I've been intimidated about documenting my own work because I know there are concepts beyond my depth: I have been in the strange situation of having made a tool that allowed me to apply it to unanticipated uses, successfully, touching tantalizingly powerful ideas that I could not fully comprehend.
Klaus Iglberger gave us a conceptualization and vocabulary to talk about Type Erasure, promoted it to its own Design Pattern, in last years' CPPCon “Breaking Dependencies: Type Erasure, a Design Analysis”. This clarity made me realize Type Erasure accomplishes contradictory objectives: semantic binding (this means substitutability as in the Liskov Substitution Principle) *without* source code coupling.
The delicate balance between opposite tendencies is the fundamental requisite of truly interesting behavior —emergent behavior—, this presentation attempts to illustrate this point.
19:00 (CET) -- Start of the videostream
19:05 (CET) -- Lightning Talk by Nicolas Chaussé
19:20 (CET) -- Klaus Iglberger: "A Brief Introduction to Type Erasure"
20:00 (CET) -- Eduardo Madrid: "Type Erasure exhibits Emergent Behavior"