FAQ
Here I am working on Java code written over last few years by many
experienced developers. It is full of unused imports, unused variables and
poorly formatted. Now IBM rational app developer is used here, and all of
issues mentioned can be taken care of with the help of tool, but it is
never done by anyone who worked on this code base. It says something about
tools and user of tools.

In my view Go has made a great decision ( apart from lots of others) on
this warning/ error issue. A lot of people would have been happier if
iphone ran flash but now we know better. The conviction of Go authors is
about language design is matter of great satisfaction to me.

Thanks
On Friday, March 8, 2013 2:08:23 PM UTC-5, Sam Harwell wrote:

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

http://tunnelvisionlabs.com



*From:* golan...@googlegroups.com <javascript:> [mailto:
golan...@googlegroups.com <javascript:>] *On Behalf Of *Nate Finch
*Sent:* Friday, March 08, 2013 10:56 AM
*To:* golan...@googlegroups.com <javascript:>
*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

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2021 Grokbase