Loading…
CppCon 2014 has ended
Wednesday, September 10 • 4:45pm - 5:45pm
Hourglass Interfaces for C++ APIs

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

C++ provides a much richer set of abstractions than C. Classes, templates, overloading, and other core C++ features can be leveraged for more readable syntax, better compile time typechecking, more open ended genericity and improved modularity. On the flip side, C89 still boasts some advantages over C++, especially when viewed through a pragmatic lens. C ABIs on many platforms have been stable for decades, practically every language supports binding to C code through foreign function interfaces, and including nearly any C89 header has a negligible effect on compile time on modern computers.

The Hourglass pattern provides the best of both worlds. It's a way to structure libraries that retains the pragmatic benefits of C89 while still providing C++'s richness both at an interface and implementation level. It makes providing bindings from other languages to C++ libraries easier, and insulates from ABI issues such as incompatibilities between debug and release variants of runtimes. This talk provides an overview of the pattern, teaches practical techniques for its implementation using C++98 and C++11, and shares experience from using the pattern in real world projects.

Speakers
SD

Stefanus Du Toit

Software Lead, Thalmic Labs
Stefanus Du Toit is a Software Lead at Thalmic Labs, where he enables amazing gestural experiences using the Myo armband. Stefanus previously worked as a Software Architect and Software Development Manager at Intel Corporation, and co-founded RapidMind (acquired by Intel), a startup... Read More →


Wednesday September 10, 2014 4:45pm - 5:45pm PDT
Leibnitz

Attendees (0)