John Bandela “Polymorphism != Virtual: Easy, Flexible Runtime Polymorphism Without Inheritance”

  Рет қаралды 18,627

CppCon

CppCon

4 жыл бұрын

CppCon.org
-
Discussion & Comments: / cpp
-
Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/CppCon/CppCon2019
-
Many C++ programmers, automatically think of virtual when they hear 'polymorphism'. However, there are better, more flexible ways to have polymorphism without using virtual. This talk will show how to achieve that.
We will start by looking at static and runtime polymorphism and discuss the advantages and disadvantages of each. Then we will take a look at 'virtual', looking at how it is implemented and the disadvantages of inheritance based polymorphism it entails.
With that background in place, we will demonstrate a technique using C++17 that combines some of the best features of static and runtime polymorphism without using inheritance while still being easy to use.
If you ever watched Sean Parent's talk "Inheritance Is The Base Class of Evil" and wanted an easier way to achieve what he achieved without the boilerplate, this talk is especially for you!
-
John Bandela
Google LLC
SWE
I first started programming in C++ at age 14 in 1994 when I cajoled my parents into buying me Visual C++ 1.0 for my birthday. It took a while, but as I learned the language, I decided I really liked C++. I attended the University of Florida and obtained my undergraduate degree in Computer and Information Science. During my undergraduate time, I created and submitted Boost.Tokenizer. I went on to medical school and neurosurgery residency, but decided to do something with a little less scary undefined behavior and returned to programming in C++.
-
Videos Filmed & Edited by Bash Films: www.BashFilms.com
*-----*
Register Now For CppCon 2022: cppcon.org/registration/
*-----*

Пікірлер
CppCon 2019: Timur Doumler “C++20: The small things”
1:03:05
Каха инструкция по шашлыку
01:00
К-Media
Рет қаралды 7 МЛН
WHY THROW CHIPS IN THE TRASH?🤪
00:18
JULI_PROETO
Рет қаралды 8 МЛН
🍕Пиццерия FNAF в реальной жизни #shorts
00:41
ELE QUEBROU A TAÇA DE FUTEBOL
00:45
Matheus Kriwat
Рет қаралды 36 МЛН
Better Code: Runtime Polymorphism - Sean Parent
57:33
NDC Conferences
Рет қаралды 70 М.
CppCon 2019: Jason Turner “The Best Parts of C++"
58:36
CppCon
Рет қаралды 89 М.
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 895 М.
Object Oriented Programming is Good | Prime Reacts
31:30
ThePrimeTime
Рет қаралды 284 М.
Каха инструкция по шашлыку
01:00
К-Media
Рет қаралды 7 МЛН