this post was submitted on 05 Feb 2025
7 points (88.9% liked)

C++

1854 readers
13 users here now

The center for all discussion and news regarding C++.

Rules

founded 2 years ago
MODERATORS
 

It is now 45+ years since C++ was first conceived. As planned, it evolved to meet challenges, but many developers use C++ as if it was still the previous millennium. This is suboptimal from the perspective of ease of expressing ideas, performance, reliability, and maintainability. Here, I present the key concepts on which performant, type safe, and flexible C++ software can be built: resource management, life-time management, error-handling, modularity, and generic programming. At the end, I present ways to ensure that code is contemporary, rather than relying on outdated, unsafe, and hard-to-maintain techniques: guidelines and profiles.

top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 6 days ago* (last edited 6 days ago)

I stick to C++98 (or 03) rules because it is so much simpler, and compiles faster. I don't have to remember countless new rules for things like initialization or constexpr/consteval. If C had classes with RAII I would just use that.