Unused import tool

FeepingCreature feepingcreature at gmail.com
Mon Aug 21 10:45:16 UTC 2023


On Sunday, 20 August 2023 at 16:17:34 UTC, Walter Bright wrote:
> In the dmd source code, there are a lot of commented out 
> printf's. There would be a lot of clutter if an import 
> statement had to be added for each of them.

To be fair, these are terrible: like half of them don't work, 
because the variables involved have been renamed or removed 
entirely. Something like `debugPrintf("...", args)` that compiled 
to a no-op in release mode would be a lot better, and also avoid 
the "unused import" problem, no? Maybe even 
`debugPrintf!"semantic2"("...", args)`, or `alias debugPrintf = 
debugPrintf!"semantic2"` at the top.


More information about the Digitalmars-d mailing list