Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-10-01 Thread Victor Giordano
> In Go, so far changes were for the better and I'm glad to change my learning if it benefits the mass of my fellow developers. Maybe. Let's see how times handle it. TD;DR; I praise for changes but it is not easy.. I mean, look at our society (the final reflection of us as an unique aggregated

Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-10-01 Thread TheDiveO
actually, language changes happen all the time. In German, there is quite some "misuse" esp. by journos that change or follow change in German, not necessarily improving clearness. In Go, so far changes were for the better and I'm glad to change my learning if it benefits the mass of my fellow

Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-09-30 Thread Victor Giordano
*Alex*, your second reply was even more powerful in terms of feelings and ideas to work with in order to embrace the change. Probably I'm struggling with an unexpected change... and let's see with time how it goes. *DiveO*, thanks you very mucho for your insight... I see your point. For me... t

Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-09-30 Thread TheDiveO
Switching between human languages, such as for me, German and English, required me to learn English at a level that I think in it. Even with their shared ancestry, I don't expect these languages to use the same structure and concepts, like loop variable scoping. Admittedly, Go doesn't allow me

Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-09-30 Thread 'Axel Wagner' via golang-nuts
So, how often do you depend on this particular scoping behavior, in Go or JS? Do you have any example of where you intentionally rely on the current behavior, that might break with the new one? I think it's important to emphasize that we do not know of a *single case* where the current behavior wa

Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-09-30 Thread Victor Giordano
Thanks Alex, your insight was very helpful. Allow me to share the feeling I have => I still struggle a little in my mind... I craft web fronts in javascript, and back in golang (and scala or java). With this change I will have two different scoping rules... and I feel I don't need it (because I le

Re: [go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-09-30 Thread 'Axel Wagner' via golang-nuts
This has come up during the discussion already. I don't know enough about other languages to speak with confidence, but apparently there already is precedent for this and/or some languages are at least considering making a similar change. Note that scoping rules already vary between languages - in

[go-nuts] About variables have per-iteration scope instead of per-loop scope

2023-09-30 Thread Victor Giordano
Hi gophers! How you doing? In my work we recently discuss with a buddy about this article . 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