Hacker News new | ask | show | jobs
by grahamedgecombe 2528 days ago
> "runes" like Go would be even better but codepoints are halfway there

Go runes are codepoints.

I think Swift is interesting, a "character" in Swift is actually a grapheme cluster.

2 comments

Swift probably inherits that from NeXT/OpenSTEP/Cocoa which was very unusual at the time in its degree of unicode support. For example it used something like unicode equivalence in string comparisons.

(You'd see objective-c benchmarks suffer because of this)

Thanks, yes the Swift model is what I would be going for.

I just wrote my first Go program this past weekend, evidently I misunderstood the tutorials/docs I read.