https://issues.dlang.org/show_bug.cgi?id=22839
Walter Bright <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Walter Bright <[email protected]> --- The reason for D's behavior is that when doing metaprogramming, lots of symbols get generated, including private ones. When doing this across multiple files, the generated symbols are often identical, so D puts them in COMDAT sections and the linker merges them so only one appears in the executable. With your suggestion, the symbols would not be merged, but would be duplicated and consuming executable file size. This would be a significant change in behavior. Because of this you suggest marking them differently so the names won't even appear in the object file, and so the linker never attempts to merge them. This hasn't come up before, so I'd like to see a compelling use case to make a language change? --
