unicode.RangeTables
maps are fast/safe for concurrent readsThis surprised me (as did discovering map
reads are always safe for concurrency despite the sketchy language1). The entire unicode
package uses simple Go maps, which are very fast.
// Categories is the set of Unicode category tables.
var Categories = map[string]*RangeTable{
"C": C,
"Cc": Cc,
"Cf": Cf,
}