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

Issue 5639054: code review 5639054: encoding/binary: hide TotalSize (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by r
Modified:
12 years, 2 months ago
Reviewers:
rsc, r2, rog
CC:
golang-dev, gri, bradfitz
Visibility:
Public.

Description

encoding/binary: hide TotalSize The function has a bizarre signature: it was the only public function there that exposed the reflect package. Also, its definition is peculiar and hard to explain. It doesn't merit being exported. This is an API change but really, it should never have been exported and it's certain very few programs will depend on it: it's too weird. Fixes issue 2846.

Patch Set 1 #

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+118 lines, -92 lines) Patch
M doc/go1.html View 2 chunks +55 lines, -44 lines 0 comments Download
M doc/go1.tmpl View 2 chunks +55 lines, -44 lines 0 comments Download
M src/pkg/encoding/binary/binary.go View 3 chunks +7 lines, -3 lines 0 comments Download
M src/pkg/encoding/binary/binary_test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 2 months ago (2012-02-08 02:13:12 UTC) #1
gri
LGTM - gri On Tue, Feb 7, 2012 at 6:13 PM, <r@golang.org> wrote: > Reviewers: ...
12 years, 2 months ago (2012-02-08 02:16:34 UTC) #2
bradfitz
LGTM On Feb 8, 2012 1:13 PM, <r@golang.org> wrote: > Reviewers: golang-dev_googlegroups.com, > > Message: ...
12 years, 2 months ago (2012-02-08 02:17:40 UTC) #3
r
*** Submitted as http://code.google.com/p/go/source/detail?r=8d1bf9e0a230 *** encoding/binary: hide TotalSize The function has a bizarre signature: it ...
12 years, 2 months ago (2012-02-08 03:09:29 UTC) #4
rog
i'm not keen on this going. it's nice to be able to know in advance ...
12 years, 2 months ago (2012-02-08 10:41:15 UTC) #5
r2
On 08/02/2012, at 9:41 PM, roger peppe wrote: > i'm not keen on this going. ...
12 years, 2 months ago (2012-02-08 11:34:17 UTC) #6
rsc
12 years, 2 months ago (2012-02-08 14:19:47 UTC) #7
If there is existing code that breaks because of
the removal of TotalSize, I think it would be fine to add

func Size(v interface{}) int {
    return dataSize(reflect.ValueOf(v))
}

Otherwise it can wait until after Go 1.

Russ
Sign in to reply to this message.

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