CppCon 2019 Trip Report
What a week we had! CppCon 2019 is by far the best CppCon that I've ever attended. There are contents that interest me on every time slot, and for a lot of time there are conflict so that it is hard to decide which talk to go to.
Pre and post-conference classes
Arthur O'Dwyer's Standard Library From Scratch teaches us the implementations of type-erased containers (
function), synchronization primitives, smart pointers, and a bunch of meta-programming utilities. This course makes me more confident about type erasure, small-object optimization, and meta-programming.
Gordon Brown and Micheal Wong's Parallelism in Modern C++: From CPU to GPU talks about general parallel programming principles and SYCL programming. I didn't have much experience in GPGPU and never touched SYCL before, but I find that many concepts maps nicely to the Vulkan Graphics API.
CppCon this year have one keynote for each day, and all the keynotes are high quality.
Bjarne Stroustrup's C++20: C++ at 40 [video] talks about the current status of C++ from the perspective of its creator. Nothing substantially surprising is in this talk, but the combination of C++ features like modules and concept has already completely transformed this language into a new height. Bjarne also talked about his vision of future C++.
Ben Smith - Applied WebAssembly: Compiling and Running C++ in Your Web Browser [video]. Interning in a company where we have a web assembly product using the C++ codebase, I am delighted that people are spreading this practice.
Sean Parent's Better Code: Relationships [video] continues his "Better Code" series. This time he was talking about theories of relationships between objects and how they guide us to architect software.
Herb Sutter's De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable [video] naturally grab everyone's attention. A large part of the communities is not satisfied, which the current status of exceptions and RTTI, so Herb's series of proposals will help tremendously. Herb gives the same talk in my user group in March.
Personal high light
There are so many great talks in this year's CppCon, so I can only mention some of them that I attended and impressed me the most.
Bryce Lelbach's The C++20 Synchronization Library [video] is probably the best concurrency talk I heard in CppCon this year. It went through not only C++20 synchronization primitives but how to use them to build a task system. I plan to watch it several times until absorbing all its content.
Alisdair Meredith and Pablo Halpern's Getting Allocators out of our way [slides] proposed an interesting language extension to simplify the writing of allocator-aware classes on top of the current
pmrmodel. The basic idea is that allocators are no longer a regular parameter, but a special parameter that we can optionally provide with a different syntax. The extension works like Scala's implicit parameter, and it can have potential use to other structures like executors.
Mathieu Ropert's This Videogame Programmer Used the STL and You Will Never Guess What Happened Next [slides] demystifies some common myth against C++ standard library, including the common concern of "debugging performance." It also explains when should you (not) use STL.
- Matt Godbolt's "Path Tracing Three Ways" [slides] implements a same primitive path tracer in three C++ styles-- object-oriented, functional, and data-oriented design. He analyze the performance and compares their strengths and weaknesses. One interesting detour is that a naively designed data-oriented code without dynamic polymorphism can be even slower than its OO counterpart because of branch misprediction (which DOD tries to avoid). The fix he applied not only improved the data-oriented version but also significantly increase the speed of the functional version. One thing I wonder is that in the particular case of path tracing, how much performance advantage of data-oriented design can be preserved when adding acceleration data-structures.
My lighting talk
I gave a lightning talk on Wednesday night called Make impossible state unrepresentable inspired by the typed functional languages communities. In the lighting talk, I mentioned how to design data and types in C++ to leverage the static type system so that invariants breaking becomes impossible in some instances.
This talk is my first presentation to give in front of the public instead of a university or meetup setting. I was nervous, but I managed to finish it. I also found that it is extremely hard to fit content into five minutes, as I cut more than half of the original slides I prepared. Thank CppCon for giving me this opportunity, and thanks Phil Nash for organizing the lighting talks well!
As a student, attending a conference at school time always gives me immense pressure in term of school works. However, CppCon was and is always worthwhile. It is a pleasure to be surrounded by so many extraordinary people in the C++ communities, and "C++ heroes" that I usually can only see online. Thank everyone I met for being awesome for the whole week. I can't wait to attend the CppCon and meet you all next year!