• 0 Posts
  • 6 Comments
Joined 2 years ago
cake
Cake day: June 10th, 2023

help-circle


  • Thanks. I generally buy my beers from such shops, because regular stores don’t sell that many types. I’ll check if they have some next time.

    Some of my favourites are from l’Hermitage, la Caracole or la Brasserie de la Seine. But there are so many breweries and choices that I could drink a different one every day for the whole year.




  • Go had the same behavior until recently. Closures captures the variable from the for loop and it was a reference to the value.
    They changed it because it’s “common” in Go to loop over something and run a goroutine that uses the variable defined in the loop. Workaround was to either shadow the variable with itself before the loop, or to pass the value as an argument.
    It’s been a long time since I wrote c# so idk if the same is expected from the avg dev, but in Go it’s really not explicit that the variable will be a reference instead of a plain value