[Issue 23655] __traits(toType) shatters modularity
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 27 07:16:24 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23655
Max Samukha <maxsamukha at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maxsamukha at gmail.com
--- Comment #1 from Max Samukha <maxsamukha at gmail.com> ---
(In reply to Adam D. Ruppe from comment #0)
>
> D has very few features that cross modules like this and they're bad to
> have. We should start removing these things, especially when they are unused
> and unnecessary, to remove potential for more serious order of eval bugs
> arising from them.
If the trait was properly designed, modularity would be trivially achieved by
an implicit local import - "Error: cannot determine" is a lie because the
mangled name contains the module information.
"toType" is a misnomer, though, as the trait should "just work" for any symbol.
--
More information about the Digitalmars-d-bugs
mailing list