[go-nuts] Re: [generics] Zero value

2020-06-22 Thread brunokim . mc
Yes, they work, though a simpler solution is using 'var zero T' before the return statement. It'd be nice to have it inline, specially for multiple return values. Em segunda-feira, 22 de junho de 2020 10:13:43 UTC-3, Andrew Werner escreveu: > > In order to get a zero value, does the following

[go-nuts] [generics] Zero value

2020-06-18 Thread brunokim . mc
First, congratulations on the working compiler! Very cool to try out generics in Go. I was experimenting with some simple generic functions and felt the need for the zero value of a generic type. I've read the discussion anticipated in your proposal