Future of D 2.x as stable/bug fix, and what's next for D 3.x
james.blachly at gmail.com
Tue Sep 1 03:55:51 UTC 2020
On 8/31/20 3:33 PM, H. S. Teoh wrote:
> ... one way to move forward is to introduce a language
> versioning mechanism to D, such that each module declares which language
> version it was written in. The compiler would internally have multiple
> versioned components that represent selected "frozen" states of the
> language, which would be selected by this version directive so that it
> retains the old semantics of the language. Ideally, this would allow us
> to retain complete backward compatibility (at least up to the point this
> versioning system was introduced) while allowing newer language versions
> to break things as necessary to implement new features. Since the
> versioning will apply by module, one can incrementally upgrade code to
> newer language versions without being forced to fix everything all at
> once upon installing a newer compiler.
I like this idea and can really give us room to grow.
**This is precisely like Rust editions:**
Every two or three years, the Rust team produces a new Rust edition.
Each edition brings together the features that have landed into a clear
package with fully updated documentation and tooling. New editions ship
as part of the usual six-week release process.
Each project can opt in to an edition other than the default 2015
edition. Editions can contain incompatible changes, such as including a
new keyword that conflicts with identifiers in code. However, unless you
opt in to those changes, your code will continue to compile even as you
upgrade the Rust compiler version you use.
An entire guide to Rust editions:
More information about the Digitalmars-d