Loading…
CppCon 2020 has ended
Monday, September 14 • 08:45 - 10:00
[Overflow] The Beauty and Power of "Primitive" C++

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

If the all_of() track is full, then join us in generate_n() as the overflow room.


Often, we focus on novel, clever, and advanced features of C++. To contrast, here I look at addressing relatively simple problems in relatively simple ways under severe constraints of performance, ease of use, and reliability. My main example is to read and write typed objects from and to a byte buffer. This is of course something we do a lot and in a bewildering variety of ways. Any object that needs to be stored or transmitted to another computer must go through such a process. However, the constrains on such reading and writing varies immensely based on the kind of data to be moved around, the performance and reliability requirements, the hardware available, and history. Many trade-offs are possible, and many different interfaces. That makes this an interesting design exercise.

This is an exploration of a design space close to the hardware and of the use of C++ in that space, rather than a standards proposal or the presentation of a mature tool chain. And, no, by “primitive”, I don’t mean “old-fashioned, C-like” code; some of the general techniques are old, but some of the code requires C++17 and much could be done better given features we are unlikely to get even in C++23.

Speakers
avatar for Bjarne Stroustrup

Bjarne Stroustrup

Professor, Columbia University
Bjarne Stroustrup is the designer and original implementer of C++ as well as the author of The C++ Programming Language (4th Edition) and A Tour of C++ (3rd edition), Programming: Principles and Practice using C++ (2nd Edition), and many popular and academic publications. He is a... Read More →


Monday September 14, 2020 08:45 - 10:00 MDT
generate_n()