Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3488)

Issue 5713049: code review 5713049: reflect: make Value.Interface return immutable data (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by rsc
Modified:
13 years, 1 month ago
Reviewers:
r2
CC:
golang-dev, r
Visibility:
Public.

Description

reflect: make Value.Interface return immutable data Fixes issue 3134.

Patch Set 1 #

Patch Set 2 : diff -r aa7ded1d6fab https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r aa7ded1d6fab https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r e30fd0c700f6 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -0 lines) Patch
M src/pkg/reflect/all_test.go View 1 1 chunk +12 lines, -0 lines 0 comments Download
M src/pkg/reflect/value.go View 1 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 9
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 1 month ago (2012-03-01 06:17:46 UTC) #1
r
LGTM although some documentation might be called for.
13 years, 1 month ago (2012-03-01 06:45:32 UTC) #2
rsc
On Thu, Mar 1, 2012 at 01:45, <r@golang.org> wrote: > LGTM although some documentation might ...
13 years, 1 month ago (2012-03-01 16:42:33 UTC) #3
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=0e0a2d1892f4 *** reflect: make Value.Interface return immutable data Fixes issue 3134. R=golang-dev, ...
13 years, 1 month ago (2012-03-01 16:48:29 UTC) #4
r2
On Mar 2, 2012, at 3:42 AM, Russ Cox wrote: > On Thu, Mar 1, ...
13 years, 1 month ago (2012-03-01 20:43:58 UTC) #5
rsc
On Thu, Mar 1, 2012 at 15:44, Rob 'Commander' Pike <r@google.com> wrote: > the question ...
13 years, 1 month ago (2012-03-01 20:48:43 UTC) #6
r2
On Mar 2, 2012, at 7:48 AM, Russ Cox wrote: > On Thu, Mar 1, ...
13 years, 1 month ago (2012-03-01 20:54:42 UTC) #7
rsc
> but that's exactly the confusion. if i have a Value, i can Set it, ...
13 years, 1 month ago (2012-03-01 20:57:22 UTC) #8
r2
13 years, 1 month ago (2012-03-01 21:04:29 UTC) #9
On Mar 2, 2012, at 7:57 AM, Russ Cox wrote:

> // Interface returns v's current value as an interface{}.

better. maybe

// Interface returns v's value as an interface{}. It is equivalent to
//	var result interface{} = (concrete value inside v).

(and make 'result' or whatever be the name of the return value)

that addresses your point that it's doing what Go does and also gives an
operational definition that may be easier to understand.

-rob

Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b