Go only has for loops so there's not much of a choice there 😂
In Python I use for as well combined with various iterators. List comprehensions are favored over map and reduce there.
I like go's for a lot. It can be a for, a while, or an infinite loop. It's all in how you use it.
The same idea shows up all over the place in it: "here's some minimal core, fiddle it however you want". It's one of its main attractions ♥️
Exacltly. I was ready to post the same about Go xD
Though go is kind of cheating since it's "for" loop can behave in many ways.
Honestly it's one of many reasons Go is great, no bikeshedding about iteration
The for loop in Go is more flexible than the one in C though. I just started with Go, and it's surprising how much they chose to diverge from other C-like languages.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.