O'Reilly logo
  • Kevin Lozandier thinks this is interesting:

At first sight it might appear that these other languages’ string types are more convenient than Go’s since individual characters in their strings can be directly indexed—something only possible in Go if the string exclusively holds 7-bit ASCII characters (since these are all represented by a single UTF-8 byte). In practical terms this is never a problem for Go programmers: first, because direct indexing isn’t used much in Go because Go supports character-by-character iteration over strings; second, because the standard library provides a comprehensive range of string searching and manipulation functions; and third, because we can always convert a Go string into a slice of Unicode code points (of type []r...


Cover of Programming in Go: Creating Applications for the 21st Century


Continuously refer back to this about variable-width characters.