Hi gophers! How you doing? In my work we recently discuss with a buddy about this article <https://go.dev/blog/loopvar-preview>. I need to talk about this....
I appreaciate that golang makes a lot of effort on this. Working with clousures cames with perils and the go vet tool emiting a warning is a great thing. Althought I do not think that chaning language semantics is something 100% good, see my point: As long I use several languages for making a system this "scope rule" will mismatch with other languajes, for example, javascript. So from now onwards I shall be aware that for loops have variables scopes in one fashion in Golang and in other fashion in another languages... so at the end of the day, I feel like is adding some burden. If for development we can use a single and sole language (Sauron don't read this :P !) I would think this change is good, but that is not the case in now-a-days. I try to think that with time, perhaps other languages evolves it this way... but.. ¿what if I wanna have my "for loop" with legacy scope (block scope, not per iteration scope)? So... I expect to the readers to talk with me, showing what they see and feel. Is not my intention to generate hard feelings at all. I'm a person that work crafting system in group with others.. I have had terrible nightmares working with Scala where implicits and invoking methods as they were feilds were terrible ideas for working in group (perhaps not if you work solo). And this feature recalls me those feelings. Greetings Víctor. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/5f31be67-d246-4778-a373-69d525772974n%40googlegroups.com.