Warn on unused imports?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Wed Sep 26 11:11:11 UTC 2018


On Wednesday, September 26, 2018 4:46:23 AM MDT Laurent Tréguier via 
Digitalmars-d wrote:
>  From dmd's help:
> ```
>    -d                silently allow deprecated features
>    -dw               show use of deprecated features as warnings
> (default)
>    -de               show use of deprecated features as errors
> (halt compilation)
> ```
> Deprecations are shown as warnings and not simple messages it
> seems. But this is probably just a matter of wording here, so not
> really relevant I think.

It's definitely a matter of wording and thus arguably should be changed. For
instance, if they were actually warnings, -w would turn a deprecation
message into an error like -de does, and it doesn't. They're frequently
called deprecation warnings, so it's no surprise that the flag would be -dw
or that the help information would say that, but from the stand point of
what flags like -w consider to be warnings, they're not warnings.

- Jonathan M Davis






More information about the Digitalmars-d mailing list