I'm sorry, but I think it's too late. Let's let xml sit and get
pounded on. We can fix this after Go 1. It is a rare and relatively
unimportant case, and the fact that the fields are ignored means that
we can fix it without changing behavior too much.
Can you please describe what this CL does before I read the code? I was ...
12 years, 10 months ago
(2012-04-25 02:52:29 UTC)
#4
Can you please describe what this CL does before I read the code?
I was kind of hoping for a discussion of what "handle" might mean.
It's not entirely obvious to me.
The CL description should also give more detail, and presumably
the package document comment needs editing. This is a significant
API change but from a quick glance you wouldn't realize that.
Thanks.
Russ
On Tue, Apr 24, 2012 at 23:52, Russ Cox <rsc@golang.org> wrote: > Can you please ...
12 years, 10 months ago
(2012-04-25 03:01:35 UTC)
#5
On Tue, Apr 24, 2012 at 23:52, Russ Cox <rsc@golang.org> wrote:
> Can you please describe what this CL does before I read the code?
> I was kind of hoping for a discussion of what "handle" might mean.
> It's not entirely obvious to me.
>
> The CL description should also give more detail, and presumably
> the package document comment needs editing. This is a significant
> API change but from a quick glance you wouldn't realize that.
Maybe that's because I don't really see that as a significant API change.
This CL makes
type Foo struct {
*Bar
}
behave as
type Foo struct {
Bar
}
does today.
I see. I thought xml was ignoring all anonymous fields. At the very least this ...
12 years, 10 months ago
(2012-04-25 03:26:20 UTC)
#6
I see. I thought xml was ignoring all anonymous fields.
At the very least this comment needs updating, no?
// * A non-pointer anonymous struct field is handled as if the
// fields of its value were part of the outer struct.
Russ
On Wed, Apr 25, 2012 at 00:25, Russ Cox <rsc@golang.org> wrote: > I see. I ...
12 years, 10 months ago
(2012-04-25 03:47:12 UTC)
#7
On Wed, Apr 25, 2012 at 00:25, Russ Cox <rsc@golang.org> wrote:
> I see. I thought xml was ignoring all anonymous fields.
> At the very least this comment needs updating, no?
>
> // * A non-pointer anonymous struct field is handled as if the
> // fields of its value were part of the outer struct.
Good catch.
Issue 5694044: code review 5694044: encoding/xml: handle anonymous pointer fields
(Closed)
Created 13 years ago by niemeyer
Modified 12 years, 10 months ago
Reviewers:
Base URL:
Comments: 4