On Tue, 11 Feb 2020 at 03:38, Ian Lance Taylor <i...@golang.org> wrote:

> On Mon, Feb 10, 2020 at 4:15 AM 'Axel Wagner' via golang-nuts
> <golang-nuts@googlegroups.com> wrote:
> >
> > It's reflect, so I don't feel confident in making any absolute
> statements (we've talked about it a bunch; I just find the implications of
> that API far too unwieldy to handle), but I tend to agree. You need a
> reference value and Bytes() seems the only typed reference value you can
> get out of reflect.Value without using Interface() and type-assertion. I
> don't think this can be fixed either - not just because of compatibility,
> but also because it would impede fmt.Print*.
>
> https://golang.org/issue/27727.
>

Ah, thanks! I'd missed that. I added a comment there FWIW.


>
> Ian
>
> > On Mon, Feb 10, 2020 at 11:46 AM roger peppe <rogpe...@gmail.com> wrote:
> >>
> >> On Sun, 9 Feb 2020 at 00:19, 'Axel Wagner' via golang-nuts <
> golang-nuts@googlegroups.com> wrote:
> >>>
> >>> (then again, the fact that this works seems slightly concerning to me:
> https://play.golang.org/p/phWQ83wPQtx)
> >>
> >>
> >> Oh, that's interesting! Is this the only way that you can use reflect
> (without unsafe) to modify the contents of unexported fields?
> >> I think it might be.
> >>
> > --
> > You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to golang-nuts+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/CAEkBMfG%3Di%2BPgKBfsNPtWNZXMzQV2AAqk%3DnQuo7Oi_pabXcJQEA%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAJhgaci%2BrifPJoHtYd9%2BH%2BaWP0rLees_L_xcnewR%3D0mCAGN5%2BA%40mail.gmail.com.

Reply via email to