Regular, revisited - Victor Ciura - Meeting C++ 2023

Published: 22 January 2024
on channel: Meeting Cpp
1,044
24

Regular, revisited - Victor Ciura - Meeting C++ 2023
Slides: https://slides.meetingcpp.com
Survey: https://survey.meetingcpp.com

“Regular” is not exactly a new concept. If we reflect back on STL and its design principles, as best described by Alexander Stepanov in his “Fundamentals of Generic Programming” paper, we see that regular types naturally appear as necessary foundational concepts in programming. Why do we need to bother with such taxonomies? Because STL assumes such properties about the types it deals with and imposes such conceptual requirements for its data structures and algorithms to work properly.

STL vocabulary types such as string_view, span, optional, expected etc., raise new questions regarding values types, whole-part semantics, copies, composite objects, ordering and equality.

Designing and implementing regular types is crucial in everyday programming, not just library design. Properly constraining types and function prototypes will result in intuitive usage; conversely, breaking subtle contracts for functions and algorithms will result in unexpected behavior for the caller.

This talk will explore the relation between Regular types (plus other concepts) and STL constructs, with examples, common pitfalls and guidance.


Watch video Regular, revisited - Victor Ciura - Meeting C++ 2023 online without registration, duration hours minute second in high quality. This video was added by user Meeting Cpp 22 January 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,044 once and liked it 24 people.