DLF September 2023 Planning Update
Paul Backus
snarwin at gmail.com
Tue Nov 14 15:55:57 UTC 2023
On Tuesday, 14 November 2023 at 15:05:34 UTC, Steven
Schveighoffer wrote:
> When considering how this should work, I would strongly suggest
> it be the default to work with the current edition of the
> language. Nobody wants to always have to attribute their module
> (or whatever other opt-in mechanism) to use current features.
> It's going to be a WTF moment for all newcomers to D.
>
> This brings us to the problem that no prior libraries have
> editions marked on them. So I think there needs to be an
> external mechanism to be able to set the edition for a package
> or module from the command line, or somehow in a config file.
> Or you can set the "assumed" edition using a switch (but it
> should still default to "current").
Worth noting that this is exactly how GCC handles different
revisions of the C and C++ standards. [1] It defaults to
`-std=gnu18` (C17 with GNU extensions) and `-std=gnu++17` (C++17
with GNU extensions), which are the most recent versions that are
fully implemented, but older versions (and previews of newer
ones!) can be selected on the command line.
D's philosophy of making the safe, recommended choice the default
has served it well for features like bounds checking, default
initialization, assertions, etc. I hope very much that the same
philosophy will be applied to editions.
[1]
https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/C-Dialect-Options.html
More information about the Digitalmars-d-announce
mailing list