Indeed! Go has while loops :)
for { // do some stuff if !condition { break } } instead of { // do some stuff } while condition They are identical functionally, so why bother with the second syntax? You then get into arguments about which one to use. -- Marcin On Tue, Nov 3, 2020 at 11:31 AM 'Amnon Cohen' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Languages often have a whole variety of loop constructs. > C has for loops as well us while loops. > Go adopts the principle from the Zen of python: > > *There should be one-- and preferably only one --obvious way to do it. *It > takes a minimalist approach - there is only one looping construct: the for > loop. > > This is an excellent decision, IMO. > > >>> > Red Sift is the power behind OnDMARC and OnINBOX. > > You can find us at 21A Noel Street, 4th Floor, London, W1F 8GR. > > > Red Sift is a limited company registered in England and Wales. Registered > number: 09240956. Registered office: Kemp House, 152 City Road, London, > EC1V 2NX. > > -- > 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. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/8d492b26-4784-448f-9714-79c43bc93527n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/8d492b26-4784-448f-9714-79c43bc93527n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CA%2Bv29Lv6k_w7M%3DciU%2BUoPSUYGaP_rekszdaHrLN_zNcaoihebg%40mail.gmail.com.