debug = x overrides command line
via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 23 00:18:36 PDT 2014
On Wednesday, 22 October 2014 at 21:10:06 UTC, Walter Bright
wrote:
> I don't want deliberately written debug code to produce
> needling warnings.
You should have an overriding option on the command line to turn
off all debugging. Having debug statements in release code is a
no-go.
> The Boy Who Cried Wolf comes to mind. The feature provides for
> a valid use case, one that is pretty hard to do any other way.
>
> Such warnings should go into a separate linting tool.
I think warnings built into the compiler is a good feature for
catching common mistakes. I use it often and find it much more
attractive than lint, which I would only use if stuck on a bug.
It is also GREAT for NEW USERS to have a "-pedantic", "-Wall" and
even an "-idiomatic" option built into the compiler.
Arguments against two binaries:
- Newbies will never user lint and they NEED heavy-duty warnings.
- There is zero advantage to having two binaries for the end user.
- Having two binaries means that IDEs will only bother to support
the compiler.
- It is slower. Having two binaries means that you have to make
two passes, first lint then compiler.
- A linting tool cannot keep pace with the compiler. If devs
report a feature as a bug, it is candidate for builtin warning.
- Not providing helpful warning options makes the compiler look
unfinished and of low quality. Without developers will blame the
compiler devs for lost time, not themselves.
Arguments for two binaries:
- It is easier for the implementor.
- Too early to add warnings to dmd since the language will change
a lot.
More information about the Digitalmars-d
mailing list