Transitions to new language semantics

Dukc ajieskola at gmail.com
Fri Jun 11 11:48:22 UTC 2021


On Friday, 11 June 2021 at 11:27:03 UTC, Ola Fosheim Grøstad 
wrote:
> I would find it much more reassuring if a comprehensive 
> solution was developed as a completely separate compiler branch.
> future branch that is considered unstable until all the corner 
> cases have been ironed out.
> This also allows more heavy restructuring of compiler 
> internals, like introducing an appropriate IR (which is needed 
> for things like borrowing or ARC, if you want something solid).

This would be short-sighted. It'd mean that the experimental 
feature developers would then have to backport all the compiler 
improvements that have been done while the feature was 
experimental. Its easier to account for the experimental features 
when doing the restructuring.

Second, if using an experimental feature requires compiling a 
separate compiler branch, not as many will use it. Hence, less 
real world testing, and even less issues ironed out.

> The cost of moving to a more complete solution after something 
> incomplete has been made official could break the camel's back.
>
> The piece-by-piece approach is a slippery slope.

We already have a three-round DIP process to catch issues before 
we make the new feature official. We probably need to be more 
explicit about what is still experimental and what is official, 
though. I think it wouldn't hurt to document that status to each 
of the preview switches in DMD.


More information about the Digitalmars-d mailing list