Re: [go-nuts] Slice header

2020-11-10 Thread shan...@gmail.com
On Tuesday, November 10, 2020 at 10:09:44 PM UTC+11 axel.wa...@googlemail.com wrote: > On Tue, Nov 10, 2020 at 11:09 AM shan...@gmail.com > wrote: > >> This seems to me to be the better solution (but it's still in the >> pipeline?) https://github.com/golang/go/issues/19367 >> an unsafe, rath

Re: [go-nuts] Slice header

2020-11-10 Thread shan...@gmail.com
On Tuesday, November 10, 2020 at 9:41:09 PM UTC+11 Jan Mercl wrote: Thank you for taking the time to answer, I'm still a little confused and have inlined where that confusion is below. On Tue, Nov 10, 2020 at 11:09 AM shan...@gmail.com > wrote: > > > My confusion is this, the comment says (

Re: [go-nuts] Slice header

2020-11-10 Thread 'Axel Wagner' via golang-nuts
On Tue, Nov 10, 2020 at 11:09 AM shan...@gmail.com wrote: > This seems to me to be the better solution (but it's still in the > pipeline?) https://github.com/golang/go/issues/19367 > an unsafe, rather than reflect, access to the slice structure, which > allows a user to do.. interesting things to

Re: [go-nuts] Slice header

2020-11-10 Thread Jan Mercl
On Tue, Nov 10, 2020 at 11:09 AM shan...@gmail.com wrote: > My confusion is this, the comment says (very clearly) > It's not safe, nor portable, and may change (although I have had it pointed > out to me that the comparability guarantee may contradict this) It does not. When there exists explic

[go-nuts] Slice header

2020-11-10 Thread shan...@gmail.com
A bit of attention has been directed at slices recently, with a few high profile blogs shining a healthy light on them (they can be traps for young players!) I'm a bit confused about SliceHeader as found in the reflect package (https://github.com/golang/go/blob/master/src/reflect/value.go#L1986