Since everyone thinks it but nobody bothers to reply to it: this whole thing
you propose can be currently done with a for loop, which not only is explicit
about what it doing, but it also lets you control if you want to exit early
from it and so on. Complicating the whole language because something is cool
(yet looks like a really complex thing that you need to think about while
reading the code) is in no one's benefit. Stop trying to avoid a couple of
extra rows of for {} (where the third row is literally just an "}") and start
embracing the fact that you can understand the code by looking at it and not
apply any complex mental acrobatics to figure out what those three lines of
code are doing. Your future self/person after you will thank you for that.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.