2 ms·
play.golang wouldn't let me use figure (‒, U+2012), endash (–, U+2013) or emdash (—, U+2014) in a variable name directly. But then the spec[1] says that only c
by zimpenfish 4y ago
play.golang wouldn't let me use figure (‒, U+2012), endash (–, U+2013) or emdash (—, U+2014) in a variable name directly.
But then the spec[1] says that only code points characterised as "Letter", an underscore, or characterised as "Number, decimal digit" are valid.
[1] https://go.dev/ref/spec#Identifiers https://go.dev/ref/spec#Identifiers
- leipert 4y agoCoptic Small Letter Dialect-P Ni should work, looks like a hyphen. Go Playground: https://go.dev/play/p/kxgOcEWsznz https://go.dev/play/p/kxgOcEWsznz https://www.compart.com/en/unicode/U+2CBB https://www.compart.com/en/unicode/U+2CBB
- zimpenfish 4y agoOh, neat catch!