-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Open
Labels
LanguageChangeSuggested changes to the Go languageSuggested changes to the Go languageLanguageChangeReviewDiscussed by language change review committeeDiscussed by language change review committeeProposal
Milestone
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.
mathvav, dolmen, mahdix, dsnet, quasilyte and 46 moregocs
Metadata
Metadata
Assignees
Labels
LanguageChangeSuggested changes to the Go languageSuggested changes to the Go languageLanguageChangeReviewDiscussed by language change review committeeDiscussed by language change review committeeProposal