3 ms·
Valid reasons for backwards incompatible changes to language syntax: 1. The language guarantees have become inconsistent, and the syntax breaks security bounda
by xorcist 2y ago
Valid reasons for backwards incompatible changes to language syntax:
1. The language guarantees have become inconsistent, and the syntax breaks security boundaries or realtime guarantees that the language explicitly promises, and it is unfixable.
2. The universe of all written code is small enough that there are guarantees the syntax is unused, or we can change all instances of the syntax in an atomic manner.
Invalid reasons for backwards incompatible language changes:
1. Everything else.
- throw16180339 2y agoI disagree with this, because there are a lot of fairly benign language extensions that break compatibility in pathological cases. Here's a C example. C90 supported block comments with /* comment */. C99 added BCPL style comments with // the rest of this line is a comment They were already a common language extension and supported by C++. Here's an example of C90 code that fails to compile under C99 because of // comments. int x = 12; int y = x //* I'm placing a comment here just to be difficult.*/ 3; Should the committee have rejected this change to prevent breaking programs with similar code?