]> Cypherpunks repositories - gostls13.git/commit
spec: clarify section on string types
authorRobert Griesemer <gri@golang.org>
Fri, 14 Sep 2012 18:31:56 +0000 (11:31 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 14 Sep 2012 18:31:56 +0000 (11:31 -0700)
commitcc06593c681878a2a87f3612aa024e69a1ac074b
tree3c57ca6441a031bbce4388df6d02d801cf2d6095
parentab224094d0bf035aff5e70cbd818fe29666cc0d1
spec: clarify section on string types

Strings happen to be represented similarly to
byte slices internally, but they don't quite
behave like them: While strings can be indexed,
sliced, and have their len() taken like byte
slices, string elements are not addressable,
make() and cap() is not supported, range loops
operate differently, and they are immutable (and
thus behave like values rather then references).

Fixes #4018.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/6503116
doc/go_spec.html