Loading…
C++Now 2021 has ended
Back To Schedule
Monday, May 3 • 1:30pm - 3:00pm
When Should You Give Two Things the Same Name?

Log in to save this to your schedule, view media, leave feedback and see who's attending!

C++ gives us many opportunities to name two things the same. Two functions can have the same name if they have different signatures; two members can have the same name if they're in different classes; two entities can have the same name if they're in different namespaces. C++ also gives us a handful of tools to exploit same-named-ness: virtual functions and dynamic dispatch, overload resolution, templates, concepts, and (to a lesser extent) macros, typedefs, and namespace aliases. In this philosophical talk replete with cherry-picked examples, I contend that we should give two entities the same name if and only if we intend to manipulate them with one of these tools.

Speakers
avatar for Arthur O'Dwyer

Arthur O'Dwyer

C++ Trainer
Arthur O'Dwyer is the author of "Mastering the C++17 STL" (Packt 2017) and of professional training courses such as "Intro to C++," "Classic STL: Algorithms, Containers, Iterators," and "The STL From Scratch." (Ask me about training your new hires!) Arthur is occasionally active on... Read More →


Monday May 3, 2021 1:30pm - 3:00pm MDT
B