Re:The search for easier safe systems programming
by pjmlp on Wednesday May 08, 2024 @09:14AM
(#40297758)
Actually, it has enough for having a 200+ pages book full of them.
"C++ Initialization Story: A Guide Through All Initialization Options and Related C++ Areas"
https://www.amazon.com/Initialization-Story-Through-Options-...
Re:The search for easier safe systems programming
by ModernMech on Wednesday May 08, 2024 @09:46AM
(#40298066)
C++ is the poster child for incidental complexity.
Re:The search for easier safe systems programming
by bluGill on Wednesday May 08, 2024 @10:49AM
(#40298713)
The reality is people have 30 year old code bases, and so a messy evolution without breaking backward compatibility is and important part of reality. C++ could have been a much better language without backwards compatibility - but nobody would used it and so what is the point.
C++ also does "lie" about reality in a lot of ways, in the sense that the actual compiled program behaves quite a bit differently than a plain reading of the code implies to a nonexpert. The most obvious form of this is the rules for effect ordering. Even the recurring complaints about the compiler doing unexpected things based on the as-if rule and undefined behavior seem to count here.