On Fri, Mar 3, 2017 at 2:00 PM, <milo.christian...@gmail.com> wrote: > I rather like Go's loops, they are simple and easy to remember, and the > problem so many languages have with dozens of different loop keywords is > neatly avoided. Too many loop types is simply a pain, but I think that one > more wouldn't hurt... > > Basically the following would be helpful in some cases without being too > "odd" compared to what is existing: > > do{ > // <loop body actions> > }for condition > > Is this a good idea? Why or why not? Anyone else have a better idea for the > syntax? (depending on how you look at it either "do" or "for" is redundant, > but removing "do" would probably require too much lookahead)
Adding a new keyword "do" would break existing programs. The loop is equivalent to for first := true; first || condition; first = false { ... } This is not the kind of change we are going to make at this stage of the language. 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.