Descriptionspec: permit "for range x" (no index variables)
This is a fully backward-compatible language change.
There are not a lot of cases in the std library, but
there are some. Arguably this makes the syntax a bit
more regular - any trailing index variable that is _
can be left away, and there's some analogy to type
switches where the temporary can be left away.
Implementation-wise the change should be trivial as
it can be done completely syntactically. For instance,
the respective change in go/parser is a dozen lines
(see https://codereview.appspot.com/112970044 ).
Fixes issue 6102.
Patch Set 1 #Patch Set 2 : diff -r 877f66c3a650 https://code.google.com/p/go/ #Patch Set 3 : diff -r 877f66c3a650 https://code.google.com/p/go/ #
Total comments: 2
Patch Set 4 : diff -r 877f66c3a650 https://code.google.com/p/go/ #
Total comments: 2
Patch Set 5 : diff -r 6866fbf95095 https://code.google.com/p/go/ #Patch Set 6 : diff -r 6866fbf95095 https://code.google.com/p/go/ #MessagesTotal messages: 8
|