Rustaceans at the border
Rustaceans at the border
Posted Apr 16, 2022 16:31 UTC (Sat) by tialaramex (subscriber, #21167)In reply to: Rustaceans at the border by bartoc
Parent article: Rustaceans at the border
By the early 21st century, there was more of a note of caution. An API which tells you whether this code is arguably a digit of some sort in the character encoding somebody (mis)configured on your server is rarely what you needed, while an API which says ASCII 0 through 9 are digits only is often useful. If you'd given away the latter in order to offer the former you looked a bit daft. Today, Rust offers only two things here, is this an ASCII digit, or (exclusively on its char type which represents Unicode's "scalar values" only) is this in Unicode's digit class? Got EUC-JP? Big-5? Too bad, decode them into Unicode and use our Unicode APIs.
If you'd done that in 1995 there'd be howls of outrage at what seems to be cultural imperialism at work, today not so much.
