Re:Fun with Unicode in Swift
by Someone on Saturday December 15, 2018 @10:18AM
(#18688649)
I don’t think the fact that Unicode identifiers can be confusing is a big problem.
If you trust some third party enough to download code they wrote and run it, the added risk that you confuse a few identifiers and run code you didn’t intend to run isn’t that big.
If this happens in code you wrote, you fix it when you discover it or learn to live with it, just as when you find the same problems with ASCII identifiers. Those also can be confusing (Il0 vs I1O, color vs colour, misspellings, etc)
Also, inconsistent transliteration to ASCII can introduce problems. Using native strings can prevent that.
If you trust some third party enough to download code they wrote and run it, the added risk that you confuse a few identifiers and run code you didn’t intend to run isn’t that big.
If this happens in code you wrote, you fix it when you discover it or learn to live with it, just as when you find the same problems with ASCII identifiers. Those also can be confusing (Il0 vs I1O, color vs colour, misspellings, etc)
Also, inconsistent transliteration to ASCII can introduce problems. Using native strings can prevent that.