So it's not really a problem with for loops, it's a problem with closures inside for loops.
this post was submitted on 19 Sep 2023
24 points (100.0% liked)
Golang
22 readers
1 users here now
This is a community dedicated to the go programming language.
Useful Links:
Rules:
- Posts must be relevant to Go
- No NSFW content
- No hate speech, bigotry, etc
- Try to keep discussions on topic
- No spam of tools/companies/advertisements
- It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
founded 1 year ago
MODERATORS
As someone just learning Go, the current behaviour is really unexpected. I’m happy that they are changing it.
Much needed change, I wish they made it apply for all go versions though