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.
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.
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
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
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.
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