C++Now 2021 has ended
Back To Schedule
Wednesday, May 5 • 11:30am - 1:00pm
Semantic Sugar: Tips for Effective Template Library APIs

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

C++20 concepts give us a brand new way to specify how our generic libraries and algorithms should be used and allow library users to better understand what is expected of them. However, concepts didn't rise from chaos, and before their adoption C++ library authors had other mechanisms to meet that goal.

In this talk I'll briefly discuss concepts, describe a variety of more mature methods for libraries to constrain and tailor their interaction with application code. Mechanisms such as tag-dispatch, specializations and customization points will be compared to concepts and to each other, and usage tips will be presented.

Special attention will be given to the 'semantic' vs. 'syntactic' nature of concepts. I'll show potential pitfalls and 'famous' cases where semantics played a significant role, and present the case for some 'semantic only' concepts, and suggest how they can be used to improve library APIs.

avatar for Roi Barkan

Roi Barkan

Professional software developer and architect since 2000, Roi's main focus throughout his career was on high performance and distributed systems, and on implementing complex and innovative algorithms. Roi has been the VP technologies of Istra Research since 2014, where he helps the... Read More →

Wednesday May 5, 2021 11:30am - 1:00pm MDT