Transitions to new language semantics
Mathias LANG
geod24 at gmail.com
Fri Jun 11 11:41:46 UTC 2021
On Friday, 11 June 2021 at 07:36:47 UTC, Sönke Ludwig wrote:
> This is something that should have been discussed already, but
> I can't remember whether that was actually the case, and it
> always bothers me every time there is friction with new DIP
> switches.
>
> [...]
I agree per-module UDAs would be nice.
We'd have to be careful about templates though: Currently the
emission strategy is that if a template can be found in a root
module, it will not be codegened (which is good because codegen
is slow). With per-module UDAs we'd probably have to emit
defensively when different attributes are used, and have to
mangle the attributes into the template (to avoid them being
folded despite being different).
This could become quite impactful if e.g. the standard library is
shipped with a different default (try to use `-allinst` and
you'll see a massive slowdown).
Another thing is that `-preview` switch are, for the most part,
not finished, nor are they made compatible with libraries. I
think every `-preview` switch should come with its "Enable by
default" draft PR to see how much breaks on Buildkite, and those
failures should mostly be fixed, so that users have a much better
experience.
More information about the Digitalmars-d
mailing list