3 ms·
> things using the new keywords that were introduced (e.g., "await") will no longer compile That's not backwards compatibility, it's forwards compatibility. Wh
by oconnor663 8y ago
> things using the new keywords that were introduced (e.g., "await") will no longer compile
That's not backwards compatibility, it's forwards compatibility. Whenever any language adds a new feature, using that feature breaks the build on old compilers. Setting `edition=2018` is no different. But the important thing is that old code continues to build unmodified on new compilers. That's what the edition system is preserving.
- deathanatos 8y agoForwards compatibility would be old code compiling in the newer "language", and I mean this from the grammar perspective: that the changes to the grammar are such that all things that were previously valid in the language remain as valid, and their meaning does not change. This is not the case. That the compiler has the user opt-in to the never version by setting a flag is irrelevant, for the discussion of versioning. (Now, for an end-user, I think it's great: you do not want to automatically break working code. I'm not saying the flag shouldn't exist, I'm saying the flag exists because the change is breaking.)
- oconnor663 8y agoYou're right, I totally misread the above.