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:

founded 1 year ago
MODERATORS
top 3 comments
sorted by: hot top controversial new old
[–] mrkite@programming.dev 6 points 1 year ago

So it's not really a problem with for loops, it's a problem with closures inside for loops.

[–] lightsecond@programming.dev 3 points 1 year ago

As someone just learning Go, the current behaviour is really unexpected. I’m happy that they are changing it.

[–] austin@programming.dev 3 points 1 year ago

Much needed change, I wish they made it apply for all go versions though