On 21.02.2013 16:43, Patrick Mylund Nielsen wrote:
I agree about gc, but I think it would be reasonable to have 'go vet'
warn about this by default. If you ARE shadowing intentionally, a
warning from vet isn't going to alarm you.
I agree about gc, but I think it would be reasonable to have 'go vet'
warn about this by default. If you ARE shadowing intentionally, a
warning from vet isn't going to alarm you.
if only for beginners) and won't harm otherwise.
On Thu, Feb 21, 2013 at 4:37 PM, Ian Lance Taylor wrote:
example, there are multiple dialects of C, including the language
described by the standard and the language accepted by GCC with the
-Wall -Werror options. I think we would want very compelling reasons
to split Go into multiple dialects at this point.
I agree that short declarations using :=, redeclarations using :=,
block scoping, and for and if statements introducing a new block scope
can in combination lead to situations that can be confusing. There
may be some way to improve matters. But I don't think that adding a
compiler flag is it.
Ian
--
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.
--
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.
--On Thu, Feb 21, 2013 at 7:22 AM, George Shammas wrote:
The flag should be the other way around.
Most people who complain about shadowing are either new to the
language or
don't understand block scoping. So why make it a flag to enable the check
when they wouldn't even to understand what the flag does without
researching
it.
Any such flag effectively creates a new dialect of the language. ForThe flag should be the other way around.
Most people who complain about shadowing are either new to the
language or
don't understand block scoping. So why make it a flag to enable the check
when they wouldn't even to understand what the flag does without
researching
it.
example, there are multiple dialects of C, including the language
described by the standard and the language accepted by GCC with the
-Wall -Werror options. I think we would want very compelling reasons
to split Go into multiple dialects at this point.
I agree that short declarations using :=, redeclarations using :=,
block scoping, and for and if statements introducing a new block scope
can in combination lead to situations that can be confusing. There
may be some way to improve matters. But I don't think that adding a
compiler flag is it.
Ian
--
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.
--
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.
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.