Re: [go-nuts] Re: Go 2 suggestion - Types like "int?"

2017-08-26 Thread gurpartap
Relevant Tweet: https://twitter.com/casio_juarez/status/900374362401914881 On Wednesday, August 23, 2017 at 1:42:07 AM UTC+5:30, Joe Tsai wrote: > > What you are asking for is captured in https://golang.org/issue/7054 > > On Tuesday, August 22, 2017 at 12:28:41 PM UTC-7, Steven Blenkinsop wrote:

Re: [go-nuts] Re: Go 2 suggestion - Types like "int?"

2017-08-22 Thread thebrokentoaster
What you are asking for is captured in https://golang.org/issue/7054 On Tuesday, August 22, 2017 at 12:28:41 PM UTC-7, Steven Blenkinsop wrote: > > Other places where Go relies on every type having a zero value: > > // Making slices with non-zero length. > s := make([]*int, 10) > > //

Re: [go-nuts] Re: Go 2 suggestion - Types like "int?"

2017-08-22 Thread Steven Blenkinsop
Other places where Go relies on every type having a zero value: // Making slices with non-zero length. s := make([]*int, 10) // Reslicing a slice beyond its length. s := make([]*int, 0, 10)[:10] // Eliding fields from a composite literal. p := struct { x: int; y: *int }