Re: [go-nuts] Type inference based on constraints

2022-02-18 Thread Jeff Peck
On 2/16/2022 2:43 PM, Ian Lance Taylor wrote: On Tue, Feb 15, 2022 at 2:49 PM Blackgreen wrote: I came across this stack overflow question: https://stackoverflow.com/questions/71131665/generics-pass-map-with-derived-types The OP attempted to pass different maps into this code: func equal[M1,

Re: [go-nuts] License of the design documents

2022-02-18 Thread Ian Lance Taylor
On Thu, Feb 17, 2022 at 5:53 AM Manlio Perillo wrote: > > What is the license of the Go design documents? > The LICENSE file in the proposal repository is the Go License, but there is > no copyright notice in the documents. In the absence of other information the Go license applies to the docume

[go-nuts] Re: go log.Println(http.ListenAndServe(...)) blocks

2022-02-18 Thread Christoph Berger
(And I really should hit "reply to all", lol) > https://go.dev/ref/spec#Go_statements : > > > The function value and parameters are evaluated as usual *in the calling goroutine*, but unlike with a regular call, program execution does not wait for the invoked funct

[go-nuts] Re: go log.Println(http.ListenAndServe(...)) blocks

2022-02-18 Thread Sean Liao
https://go.dev/ref/spec#Go_statements : > The function value and parameters are evaluated as usual in the calling goroutine, but unlike with a regular call, program execution does not wait for the invoked function to complete. http.ListenAndServe is being evalua

Re: [go-nuts] go log.Println(http.ListenAndServe(...)) blocks

2022-02-18 Thread Robert Engels
Because the arguments are evaluated when the go keyword is encountered - and listen and serve is blocking on port 8082 > On Feb 18, 2022, at 10:38 AM, Christoph Berger > wrote: > >  > Hi gophers, > > I hope someone can help finding out why a particular goroutine call can block > the main g

[go-nuts] go log.Println(http.ListenAndServe(...)) blocks

2022-02-18 Thread Christoph Berger
Hi gophers, I hope someone can help finding out why a particular goroutine call can block the main goroutine. In the following code, all "go" calls spawn off a goroutine and return as expected, except for the last one that blocks the main goroutine. Is this a bug, or am I missing something s