Hacker News new | ask | show | jobs
by colin_mccabe 1652 days ago
Go treats strings as a sequence of unicode code points.
1 comments

I believe they’re treated as byte sequences: https://go.dev/ref/spec#String_types
Not treated as, only backed by byte sequences. If you range over them you get a series of rune values that can be multi-byte code points.

There's a few other differences, strings cannot be directly mutated or have the address of their elements taken.