3 ms·
Maybe Andrew is referring to this? I'm just guessing but that is the only thing I can think of which could be considered broken. Go mostly just treat strings as
by feffe 5y ago
Maybe Andrew is referring to this? I'm just guessing but that is the only thing I can think of which could be considered broken. Go mostly just treat strings as bag of bytes and you have to use one of the unicode packages to actually do any significant work with them.
https://play.golang.com/p/Dla3sXciYXC https://play.golang.com/p/Dla3sXciYXC
I also think string handling in Go is pretty sane. But range vs indexing on strings is something you need to be aware of.
- svnpenn 5y agoI don't see anything wrong in that example. As you said, golang has unicode/utf8, as well as the utf8string package. Is anyone really suggesting that the default slice should be on graphemes?
- anonymoushn 5y agoThat's one of relatively few things that language-level utf-8 support could get you over utf-8 support in the standard library.