News for hackers. Stuff that matters.
Re:The search for easier safe systems programming by UncleMeat on Wednesday May 08, 2024 @08:05AM (#40297051)
C++ has a bazillion different ways of initializing a value, most of which contain syntactic footguns of some kind that don't do what you probably intended. That's not fundamental complexity of reality, that's messy evolution over decades coupled with the inability to break backwards compatibility.

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.

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.
Re:The search for easier safe systems programming by UncleMeat on Wednesday May 08, 2024 @10:59AM (#40298830)
I don't think that C++'s rigorous adherence to backwards compatibility (include binary compatibility) is a bad choice. It has served the language well. It just has consequences.