[go-nuts] generics: Zero value for any type parameter

2021-12-16 Thread Johan Bolmsjö
Hello, I've been playing with the new generics support in 1.18beta 1 today. I've come across a situation a couple of times where it would be convenient to be able to conjure the zero value for a variable corresponding to a type parameter. I've searched a bit for this to no avail. Understandab

[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