News for hackers. Stuff that matters.
Re:Zig 0.9.0 by feffe on Tuesday December 21, 2021 @07:34AM (#29636759)
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

I also think string handling in Go is pretty sane. But range vs indexing on strings is something you need to be aware of.

Re:Zig 0.9.0 by svnpenn on Tuesday December 21, 2021 @09:35AM (#29637698)
I 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?
Re:Zig 0.9.0 by anonymoushn on Wednesday December 22, 2021 @09:00AM (#29649362)
That's one of relatively few things that language-level utf-8 support could get you over utf-8 support in the standard library.