As in a number of previous questions, this one was asked poorly and the answers 
dance all around the intention. I had decided never to enter the fray of these 
oddly-put assertion/half questions, but since this is lingering, may I suggest 
that this is his real question:

“can we have var-style declarations in the places where the shorthand syntax is 
allowed?”

elaborating…

for i := 0; i < 10; i++ {…}

might also allow

for var i int; i < 10; i++ {…} 

and likewise in other short-variable-permitting contexts.

Personally, it seems that the simplest argument in favor would be orthogonality 
and the best argument in favor would be the natural creation of multiple scope 
local variables. This “best” is not very strong, though, since it is unclear to 
me how you could introduce variables of multiple types.

Not taking sides here…just feeling that the core issue was not addressed. Nor 
was the much better question that was not asked, “why was the decision made in 
Go not to allow non-short variable declarations in these contexts?”


-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to