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...

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

[go-nuts] Re: Go FAQ needs updates or not?

2023-09-30 Thread Kamil Ziemian
If I can, I want to make another comment about Go FAQ. In section "Why can't the compiler infer the type argument in my program?" we read "There are many cases where a programmer can easily see what the type argument for a generic type or function must be, but the language does not permit the

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

[go-nuts] Golang Internals link

2023-09-30 Thread Jino Jose
Hello, am Jino, a huge fan of golang. I am on a path to advance golang and would like to get details on golang internals .. I understand if I go through the source code I can get it for sure but it is taking more time  and bit confusing. Initially, I tried this link

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 -

[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

Re: [go-nuts] What is a ordinary and exceptional error?

2023-09-30 Thread Kamil Ziemian
Thank you mister Rader, this was what I needed. I think I now have intuition what this text want to say. Best regards Kamil piątek, 29 września 2023 o 23:58:39 UTC+2 Kurtis Rader napisał(a): > An ordinary error is one that can be expected to occur. For example, > opening a file may fail

[go-nuts] Re: Is it expected that signal.NotifyContext() changes the execution thread?

2023-09-30 Thread TheDiveO
Did you explicitly lock the initial OS thread, aka M0, to the main/initial go routine by calling runtime.LockOSThread() from main or an init func? I suspect you were lucky in the past, but I might be wrong. On Saturday, September 30, 2023 at 5:20:47 AM UTC+2 Kurtis Rader wrote: > I was