Support alias this in module scope?
Manu
turkeyman at gmail.com
Wed May 23 03:44:36 UTC 2018
Okay, I'm still really angry about the stupid stupid decision to make
C++ namespaces into scopes rather than just a detail used for
mangling, with absolutely no consultation of the community, in
particular the target audience, who are unanimously annoyed as far as
I can tell...
I'm unsatisfied by the work-arounds to make the situation not-suck,
but I think I have an idea that would pacify me...
If we can use `alias this` to mirror an entire C++ namespace into the
location we want (ie, the scope immediately outside the C++
namespace!!), then one sanitary line would make the problem quite more
tolerable:
extern(C++, FuckOff)
{
void bah();
void humbug();
}
alias this FuckOff; // <-- symbols are now aliased where they should
have been all along
(count the seconds until the reply that says to use reflection to scan
the scope, and use a mixin to... blah blah)
More information about the Digitalmars-d
mailing list