C++Now 2019 has ended
Back To Schedule
Friday, May 10 • 11:00 - 12:30
The Plan for Tomorrow: Extension Points in C++ Applications

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

Feedback form is now closed.
For years, the callback paradigm with a function pointer and sometimes a void pointer to some user data has dominated synchronous (and sometimes asynchronous) programming extension models in C. Yet later still, C++ code virtual classes, override-able (pure) functions have been used (and abused) with varying degrees of success in projects that seek to extend their functionality beyond what was originally programmed. Unfortunately, virtual classes are still too heavy for many cases where external-to-application extension was not really necessary, leaving developers to add various sorts of hooks and serialization which are increasingly being milled through templates and other extension points.

Is there something better than the typical callback paradigm or virtual class methods for allowing a user to hook a library or middleware's inner workings?

This case study will review several libraries and discuss the merits of their non-dynamic extension points, including virtual serialization in game engines, iostream higher order function mechanisms, sol3 and nlohmann::json. We will discuss the pros and cons of each, how extensible they end up being, and what limitations come from choices such as ADL extension (with and without priority tags) or struct template specialization. Come join us for a deep dive in what it means to allow a developer to extend your application with their types and routines at compile-time!

avatar for JeanHeyd Meneide

JeanHeyd Meneide

Student, Columbia Unviersity
JeanHeyd "ThePhD" is a student at Columbia University in New York. Most of his programming is for fun and as a hobby, even if his largest open-source contribution -- sol2 -- is used across many industries. He is currently working towards earning his own nickname, climbing the academic... Read More →

Friday May 10, 2019 11:00 - 12:30 MDT
Flug Auditorium
  case study