3 ms·
> Restricting to a subset of ASCII or even just to the BMP does have meaningful advantages, if it's an option for a particular domain. This is definitely appro
by sunshowers 2y ago
> Restricting to a subset of ASCII or even just to the BMP does have meaningful advantages, if it's an option for a particular domain.
This is definitely appropriate in some cases, but for Rust specifically gets in the way a lot. For example, &camino::Utf8Path and &str have transparent conversions both ways, in a way that users rely on heavily (passing in a string into a function that takes an AsRef<Path> or AsRef<Utf8Path> is extremely common). If you introduced, say, AsciiPath, there would be a lot more friction -- you couldn't just pass in an arbitrary string and treat it as an AsciiPath.
Again, Schelling point -- without prior coordination you can assume that folks are using strings.