> Unfortunately, Go’s library doesn’t get updated every time Unicode does. As of now, January 2026, it’s still stuck at Unicode 15.0.0, which dates to September 2023; the latest version is 17.0.0, last September. Which means there are plenty of Unicode characters Go doesn’t know about, and I didn’t want Quamina to settle for that.
I have to say I am surprised about that. Does anyone have any context or guesses as to why this is the case?
EDIT: Go's unicode was actually updated to v17 yesterday:
> Sure, these automata are “wide”, with lots of branches, but they’re also shallow, since they run on UTF-8 encoded characters whose maximum length is four and average length is much less
3 comments
[ 2.7 ms ] story [ 22.7 ms ] threadI have to say I am surprised about that. Does anyone have any context or guesses as to why this is the case?
EDIT: Go's unicode was actually updated to v17 yesterday:
https://github.com/golang/go/commit/dd39dfb534d2badf1bb2d72d...
I would consider splitting this task into two:
- extracting the next Unicode code unit
- determining whether it’s in the code class
For the second, instead of using an automaton, one could use a perfect hash (https://en.wikipedia.org/wiki/Perfect_hash_function). That could make that part branch-free.
Is that a good idea?