How about Go's... error on unused imports?

Bill Baxter wbaxter at gmail.com
Fri Nov 13 16:41:32 PST 2009


On Fri, Nov 13, 2009 at 4:29 PM, Lutger <lutger.blijdestijn at gmail.com> wrote:
> Bill Baxter wrote:
>
>> On Fri, Nov 13, 2009 at 10:28 AM, Lutger <lutger.blijdestijn at gmail.com>
>> wrote:
>>> Justin Johansson wrote:
>>>
>>>> No, sorry I am not informed on D's policy about warnings
>>>
>>> Exactly. Ever wondered why that is?
>>>
>>> The policy is: there are no warnings.
>>
>> Probably more clear to say "all warnings are treated as errors."
>>
>> --bb
>
> Note there is no way to treat warnings as warnings, making those 'warnings'
> just errors that can be turned on or off. Since there are no warnings to
> begin with, there are no warnings to treat as errors.
>
> I think that better reflects the idea that according to Walter, the concept
> of a compiler warning is inherently broken and thus rejected. Your code
> either compiles or not, which goes against the idea of what warnings are.

We're just splitting hairs here, but the nuance I got from "there are
no warnings" is that there are no checks ever performed of the type
most compilers call warnings.  That's not true.   It does perform
those kinds of checks with the -w flag, it just causes the compilation
to fail when such things are found.

So all I'm sayin' is that if you're trying to actually be helpful,
then a better explanation is "all warnings are treated as errors".  If
just want to make a political point, maybe your way is better.

--bb



More information about the Digitalmars-d mailing list