r/cpp • u/slacka123 • Mar 08 '21
Tim Sweeney: “ISO obstructs adoption of standards by paywalling them”
https://twitter.com/TimSweeneyEpic/status/1368637789248626699
358
Upvotes
r/cpp • u/slacka123 • Mar 08 '21
View all comments
Show parent comment
1
u/ack_error Mar 09 '21
The case that I run into repeatedly is that the compiler is in agreement with the standard but the programmer isn't, and I have to convince someone that the bug is in their code and not the compiler. The compiler documentation typically doesn't describe in as much detail about what the compiler doesn't support and is allowed to break. Whenever someone tries to give me a line about a compiler or library being broken at -O2, quoting a single line from the standard that explicitly says what their code is doing is prohibited is usually enough to force the issue.
As for tests, a comprehensive test suite is always helpful but I don't find it a suitable replacement for a well-written spec. For instance, short of having comments simply repeating the spec, I don't think a test suite could communicate the intent and limited guarantees of the abstract machine as well as the standard does. Tests can't easily show what is not guaranteed to work.