←back to thread

Go subtleties

(harrisoncramer.me)
234 points darccio | 1 comments | | HN request time: 0s | source
Show context
bmn__ ◴[] No.45670100[source]
FTA:

> Runes correspond to code points in Go, which are between 1 and 4 bytes long.

That's the dumbest thing I've read in this month. Why did they use the wrong word, sowing confusion¹, when any other programming language and the Unicode standard uses the correct expression "code point"?

¹ https://codepoints.net/runic already exists

replies(2): >>45675215 #>>45676397 #
debugnik ◴[] No.45675215[source]
> uses the correct expression "code point"

Actually no, these are Unicode scalars, not code points; they exclude the surrogate category.

I agree that rune is a very poor name for it. It both mistakes what runes actually are and clashes with the runic block. But C# has adopted the Rune name for some reason.

Rust simply calls these char, and OCaml uchar (unicode char), which are much better choices.

replies(1): >>45679113 #
debugnik ◴[] No.45679113[source]
My bad, I just double-checked and Go did the dumb thing again: They are indeed representing full code points rather than scalars like everyone else.
replies(1): >>45679423 #
1. bmn__ ◴[] No.45679423[source]
Thank you for striving to be correct and taking the time for the investigation.