Hi Nate,

I think this behavior is particularly noticeable to people with experience working with the Microsoft compilers as well. They group compiler errors by relative severity (Error, the Warning Levels 1-4 in order). The Go compiler behaves similar to what you get if you set the reporting level to (for C#) /warn:4 /warnaserror.

I do wish the Go compiler separated its errors by severity, assigned numbers to them, and allowed errors at some severity levels to be treated as warnings (including the one addressed by this thread and the error concerning unused imports). As-is, when a compiler error occurs there is no immediate indication of whether I actually did something wrong or just did something that someone arbitrarily decided to not allow, even though allowing it would have no impact on the semantics of the language.

It seems most people would be happy if:

1. The compiler was able to classify messages as "errors" or "warnings"

2. All current messages were given the initial severity of "error", with the exception of the unused assignment and unused import messages

3. A compiler flag to treat warnings as errors was added and enabled by default (or perhaps have a flag to not treat warnings as errors instead)

This would preserve the current behavior for general development while addressing the concerns of developers who have expressed a preference for differing approaches to product development.

Thank you,
Sam Harwell
Owner, Lead Developer

From: golang-nuts@googlegroups.com On Behalf Of Nate Finch
Sent: Friday, March 08, 2013 10:56 AM
To: golang-nuts@googlegroups.com
Subject: [go-nuts] Re: one button mice and compiler errors on unused variables

If it is ever removed I will be completely flabbergasted.

I mean this in the most non-confrontational way possible: are you coming from a mainly interpreted language background? It seems that the people who complain about the compiler errors the most are those who are not used to using a compiler at all.

You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts


Follow ups

Related Discussions



site design / logo © 2021 Grokbase