A Short Life span - For A Regular Mess
summary
Argues that std::span arrives from the GSL to replace pointer+length pairs but ends up a non-owning borrow type with surprising semantics: copy is shallow copy, element comparison was removed, so span is semi‑regular not regular. Notes practical tool support: clang 7+ implements span, GCC STL lags, Chromium and Christian Brindle implementations exist, and Visual Studio’s C++ Core Guidelines checkers warn about pointer arithmetic. Concludes span’s design reduces bugs in some cases but creates new surprises for API design.
AI-written summary · about
chapters (12)
- 0:00Introduction and motivation
- 3:19Fundamentals of programming
- 6:58The role of mathematics in code
- 12:23Principles of STL and concepts
- 16:54Concepts and naming conventions
- 20:16Ordering and equality
- 22:15Regular and semi-regular types
- 25:48String view analysis
- 31:31Deep dive into span
- 39:32Span design challenges
- 48:23Practical implementation issues
- 51:42Conclusion and call to action
related talks
04mmulti_span<...>
01h 00mThe Guideline Support Library: One Year Later
01h 30mTaming C++23 - The Things About C++23 You Do Not Know
01h 04mHow to Use string_view in C++ - Basics, Benefits, and Best Practices
54mGeneric Programming Without (Writing Your Own) Templates
01h 08mRegular Types and Why Do I Care ?
01h 06mRegular Types: From Stepanov to C++ Concepts
54mTypical C++, But Why?
