[Issue 23941] [DIP1000] Overloading by scope should be allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 24 00:26:06 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23941

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
(In reply to Vladimir Panteleev from comment #3)
> But that's a problem with the compiler, not the language, right? There's
> nothing fundamental stopping someone from writing a D compiler that
> correctly allows this?

It is a language problem. The dip1000 rules were designed as a layer that adds
extra protections. But when they start changing the way overloading works, then
they are changing the behavior. At some point, we lose our grip on how the
language works.

This is especially true since the language allows inference of scope
attributes. When does the inference happen, and how does that interact with
overloading?

I really hate to get lost in a swamp over this. When we designed 'alias this',
we wound up lost in a swamp of having little idea how to resolve interactions
with other features in a principled way. It worked fine in isolation, but not
when mixed with inheritance.

--


More information about the Digitalmars-d-bugs mailing list