Editions provide a way to evolve D by obsoletingfeatures while maintaining compatibility with code that uses thosefeatures. Editions are a module level feature, i.e. various sectionsof a module cannot be set to different editions.
The edition is set either by default, by putting it in theModuleDeclaration,or with the-edition command line switch.
Editions are meant to be backwards and forwards compatible; it makes it possible for a Dmodule targeting one edition to import a D module targeting any other edition.A template must obey the rules of the edition targeted by the module in which itis defined, not the module in which it is instantiated. Compatibility is at thesource code level; no promises of ABI compatibility are made. All code, old andnew, must be compiled with the same version of the compiler. Only one versionof DRuntime, which must support all existing editions, is to be provided with a compiler release.
Edition:DecimalInteger
sharedint i;i += 5;
would be lowered to:
sharedint i;i.atomicOp!"+="(5);
An edition level is determined by: