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

2023-09-29 Thread Kurtis Rader
I was rewriting a program I originally wrote in Python many years ago that uses OpenCV. I wanted to make it possible to cleanly terminate the Go version when SIGINT was sent to the process; e.g., by pressing Ctrl-C. So I changed how the context was created from this in the main() function: ctx,

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

2023-09-29 Thread Kurtis Rader
An ordinary error is one that can be expected to occur. For example, opening a file may fail because the file does not exist or the process doesn't have permission to open it. An exceptional error is one that is not expected to occur and often indicates the state of the program is invalid. For

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

2023-09-29 Thread Kamil Ziemian
Hello, In Go FAQ we read "We believe that coupling exceptions to a control structure, as in the try-catch-finally idiom, results in convoluted code. It also tends to encourage programmers to label too many ordinary errors, such as failing to open a file, as exceptional.", " Go also has a

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

2023-09-29 Thread Kamil Ziemian
Ok, there is one thing connected to Go FAQ that I don't like. In section "When did Go get generic types?" we read "See the language spec and the proposal for details.", where proposal in question is "Type Parameters

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

2023-09-29 Thread Kamil Ziemian
Hello, I read Go FAQ again and I'm start to think that few minor things may needs some update. It is only my humble opinion and I'm not even true programmer, only hobbist, so if you disagree, you are probably right. "What is the purpose of the project?" This section starts "At the time of Go's