CppCon 2014 has ended
Back To Schedule
Tuesday, September 9 • 4:45pm - 5:45pm
Pragmatic Type Erasure: Solving Classic OOP Problems with an Elegant Design Pattern

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

There are numerous, serious OOP design problems that we have all encountered in production code. These include, among others: - object lifetime/ownership - how to make classes from different class hierarchies conform to a common interface - writing classes that can present multiple interfaces - separating interface and implementation - how to write virtual functions so that subclasses override them properly - the virtual inheritance "diamond of death"

Proper use of type erasure can mitigate, or outright eliminate, these and other problems, without sacrificing performance.

This talk will cover the OOP design problems above and more, and will cover hand-rolled and library-based type erasure approaches that solve those problems. Performance metrics will be provided for the different approaches, and source code will be available after the talk.

avatar for Zach Laine

Zach Laine

Sr. Principal Software Engineer, Cadence Design Systems
Zach Laine has been using C++ in industry for 15 years, focusing on data visualization, numeric computing, games, generic programming, and good library design. He finds the process of writing bio blurbs to be a little uncomfortable.

Tuesday September 9, 2014 4:45pm - 5:45pm PDT

Attendees (0)