Open
Description
The conversion of an integer to a string was put in very early to bootstrap formatted printing, if I remember correctly. It's odd, though, and no longer necessary, if it ever was. It also causes inconsistencies, since string(0xD800) cannot produce the UTF-8 encoding for that code point (by definition, surrogates are not legal in UTF-8) so must produce something else. We chose the "\uFFFD" since that's the only reasonable option, but that means: 1) the result isn't obvious 2) string(0xD800) and "\uD800" do different things: the former produces the UTF-8 for U+FFFD while the latter is statically rejected. I propose that, in some remote future, we eliminate this conversion from the language.
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
adg commentedon Jan 21, 2013
Comment 1:
rsc commentedon Jul 30, 2013
Comment 2:
Labels changed: added go2.
rsc commentedon Dec 4, 2013
Comment 3:
Labels changed: added repo-main.
rsc commentedon Mar 3, 2014
Comment 4:
Labels changed: added release-none.
76 remaining items