• Russ Cox's avatar
    allow copy of struct containing unexported fields · d03611f6
    Russ Cox authored
    An experiment: allow structs to be copied even if they
    contain unexported fields.  This gives packages the
    ability to return opaque values in their APIs, like reflect
    does for reflect.Value but without the kludgy hacks reflect
    resorts to.
    
    In general, we trust programmers not to do silly things
    like *x = *y on a package's struct pointers, just as we trust
    programmers not to do unicode.Letter = unicode.Digit,
    but packages that want a harder guarantee can introduce
    an extra level of indirection, like in the changes to os.File
    in this CL or by using an interface type.
    
    All in one CL so that it can be rolled back more easily if
    we decide this is a bad idea.
    
    Originally discussed in March 2011.
    https://groups.google.com/group/golang-dev/t/3f5d30938c7c45ef
    
    R=golang-dev, adg, dvyukov, r, bradfitz, jan.mercl, gri
    CC=golang-dev
    https://golang.org/cl/5372095
    d03611f6
Name
Last commit
Last update
..
5a Loading commit data...
5c Loading commit data...
5g Loading commit data...
5l Loading commit data...
6a Loading commit data...
6c Loading commit data...
6g Loading commit data...
6l Loading commit data...
8a Loading commit data...
8c Loading commit data...
8g Loading commit data...
8l Loading commit data...
cc Loading commit data...
cgo Loading commit data...
cov Loading commit data...
gc Loading commit data...
go Loading commit data...
godoc Loading commit data...
gofix Loading commit data...
gofmt Loading commit data...
goinstall Loading commit data...
gomake Loading commit data...
gopack Loading commit data...
gotest Loading commit data...
govet Loading commit data...
goyacc Loading commit data...
hgpatch Loading commit data...
ld Loading commit data...
nm Loading commit data...
prof Loading commit data...
Makefile Loading commit data...