Hasty Briefsbeta

Bilingual

The C++ Standard Library Has Been Walking Itself Back for Fifteen Years

5 hours ago
  • #Software Maintenance
  • #Standard Library
  • #C++
  • The C++ standard library has been incrementally replacing or deprecating its own features for fifteen years, with public documentation of these changes.
  • Three tiers of 'walk-backs' exist: formal deprecations/removals (e.g., std::auto_ptr, dynamic exception specifications), unwritten but widely avoided features (e.g., std::regex, std::async), and ABI-locked broken defaults (e.g., std::unordered_map, std::list) that cannot be fixed.
  • A benchmark shows C++'s naive use of standard containers (std::unordered_map, std::map, std::list) results in 58x higher P99 latency compared to Rust's defaults, highlighting performance issues from legacy designs.
  • The 'Vasa problem' describes the committee adding unnecessary features (e.g., std::simd) that increase complexity without practical benefit, burdening implementers and users.
  • Compared to other languages, C++ uniquely retains mistakes due to permanent ABI stability, enforced by linker compatibility, preventing removal or major fixes of flawed features.