Re: [go-nuts] Re: generic function with a pointer parameter

2022-01-28 Thread Manlio Perillo
On Thursday, January 27, 2022 at 10:53:52 PM UTC+1 Ian Lance Taylor wrote: > On Thu, Jan 27, 2022 at 1:38 PM Manlio Perillo > wrote: > > > > On Thursday, January 27, 2022 at 11:42:19 AM UTC+1 Manlio Perillo > wrote: > > > [...] > > > > Here is an alternate implementation: > > > > https://go

Re: [go-nuts] Re: generic function with a pointer parameter

2022-01-27 Thread Ian Lance Taylor
On Thu, Jan 27, 2022 at 1:38 PM Manlio Perillo wrote: > > On Thu, Jan 27, 2022 at 10:00 PM Ian Lance Taylor wrote: > > > > On Thu, Jan 27, 2022 at 3:13 AM Manlio Perillo > > wrote: > > > > > > On Thursday, January 27, 2022 at 11:42:19 AM UTC+1 Manlio Perillo wrote: > > [...] > > > Here is an al

Re: [go-nuts] Re: generic function with a pointer parameter

2022-01-27 Thread Manlio Perillo
On Thu, Jan 27, 2022 at 10:00 PM Ian Lance Taylor wrote: > > On Thu, Jan 27, 2022 at 3:13 AM Manlio Perillo > wrote: > > > > On Thursday, January 27, 2022 at 11:42:19 AM UTC+1 Manlio Perillo wrote: > [...] > > Here is an alternate implementation: > > https://gotipplay.golang.org/p/mGm8DkqkuAX >

Re: [go-nuts] Re: generic function with a pointer parameter

2022-01-27 Thread Ian Lance Taylor
On Thu, Jan 27, 2022 at 3:13 AM Manlio Perillo wrote: > > On Thursday, January 27, 2022 at 11:42:19 AM UTC+1 Manlio Perillo wrote: >> >> Consider this example, adapted from >> https://github.com/golang/proposal/blob/master/design/43651-type-parameters.md#composite-types-in-constraints >> (note t

[go-nuts] Re: generic function with a pointer parameter

2022-01-27 Thread Manlio Perillo
In your implementation, p type is no longer generic. Manlio On Thursday, January 27, 2022 at 6:29:25 PM UTC+1 clemento...@gmail.com wrote: > Hello > Check this > > https://gotipplay.golang.org/p/d7nq2OV82Nv > > > On Thursday, January 27, 2022 at 12:12:50 PM UTC+1 manlio@gmail.com > wrote:

[go-nuts] Re: generic function with a pointer parameter

2022-01-27 Thread Clem Clem
Hello Check this https://gotipplay.golang.org/p/d7nq2OV82Nv On Thursday, January 27, 2022 at 12:12:50 PM UTC+1 manlio@gmail.com wrote: > On Thursday, January 27, 2022 at 11:42:19 AM UTC+1 Manlio Perillo wrote: > >> Consider this example, adapted from >> https://github.com/golang/proposal/

[go-nuts] Re: generic function with a pointer parameter

2022-01-27 Thread Manlio Perillo
On Thursday, January 27, 2022 at 11:42:19 AM UTC+1 Manlio Perillo wrote: > Consider this example, adapted from > https://github.com/golang/proposal/blob/master/design/43651-type-parameters.md#composite-types-in-constraints > > (note that the example is incorrect): > https://gotipplay.golang.org