Future of D 2.x as stable/bug fix, and what's next for D 3.x
claptrap
clap at trap.com
Mon Aug 31 20:57:02 UTC 2020
On Monday, 31 August 2020 at 19:33:45 UTC, H. S. Teoh wrote:
> On Mon, Aug 31, 2020 at 07:11:40PM +0000, IGotD- via
> Digitalmars-d wrote:
>> On Monday, 31 August 2020 at 16:34:00 UTC, Paul Backus wrote:
>>
> IOW, it's what Andrei has been repeating about adding rather
> than changing. Add new versions of the language in the same
> compiler, instead of changing the meaning of the current
> version of the language.
Could you use a compatibility layer? Say you have a module that
is pre safe by default, you could have a component that annotates
it so it's safety is explicit and then it can be passed to the
new safe by default compiler.
Like the error with ints being truncated on assignment (cant
remember what the proper name for it was), you could have a
component that just inserts casts where needed, and then it could
be passed to the newer compiler.
You wouldn't even need compiler versioning, the module could just
declare the specific feature it's not updated to yet, and that
would cause it to be run through the compatibility process.. Eg..
version(notSafeByDefault);
More information about the Digitalmars-d
mailing list