Transitions to new language semantics

WebFreak001 d.forum at webfreak.org
Fri Jun 11 11:05:09 UTC 2021


On Friday, 11 June 2021 at 07:36:47 UTC, Sönke Ludwig wrote:
> [...]
>
>
>     @semantic("dip1000") @semantic("default-to-safe")
>     @disableSemantic("dip999")
>     module foo;
>
>
>     module foo;
>     pragma(semantic, "dip1000");
>     pragma(semantic, "default-to-safe");
>     pragma(disableSemantic, "dip999");
>
>
> [...]
>
> Finally, I think that this would considerably impact the rate 
> of adoption during the preview phase, which I guess currently 
> is extremely low due to the friction with external code and the 
> need to upgrade full code bases at once.
>
> I'm aware that this will require a different approach for the 
> implementation and probably only makes sense for new DIPs, but 
> it would also make some simple but long overdue changes, such 
> as changing defaults to `@safe nothrow` (`final`?), a lot 
> easier.

I would love this! I agree with your points and I think adoption 
(and bug finding) could be significantly improved by something 
like this.


More information about the Digitalmars-d mailing list