[go-nuts] Re: Reflecting on an outer struct from a method of an inner one.

2018-09-07 Thread ianbruene
On Thursday, September 6, 2018 at 6:34:54 PM UTC-5, Eric Raymond wrote: > In the attached program, I would like to be able to remove the &x argument > from ListFields. That is, I want the Inner code to be able to reflect on > the Outer instance without having to be fed the address of the Oute

Re: [go-nuts] Reflecting on an outer struct from a method of an inner one.

2018-09-07 Thread ianbruene
On Friday, September 7, 2018 at 3:01:23 AM UTC-5, Nigel Tao wrote: > > Building on Todd's example, you can add a little more type safety > (having the map value type be a "func etc" instead of "reflect.Value) > by Curry'ing the receiver: https://play.golang.org/p/n3sDpxfd2td > > I've also spli