4 ms·
> Follow the recommendation of UAX #31 and normalize identifiers to NFKC prior to comparing them. You're proposing that we replace the rules for identifier equ
by adwn 8y ago
> Follow the recommendation of UAX #31 and normalize identifiers to NFKC prior to comparing them.
You're proposing that we replace the rules for identifier equality (comparing case-sensitive ASCII strings composed of A-Z, a-z, 0-9, _ is very easy to understand) with a complex system which hardly anyone can remember in its entirety, and even fewer people will want to learn? All so that according to you, some people need to learn a little less English? I sure hope that those normalization rules have been translated to lots of languages, otherwise those people would still need to learn English...
> Now we have the ability to lessen that burden and let the non-ASCII world (which does in fact include English!) spend less time learning English and more time writing code.
Do you seriously think that a programmer needs lower English skills just because they can use non-ASCII characters in their function names? That programming language's standard library is in English, its documentation is in English, external libraries are in English, their documentation is in English, StackOverflow is in English, but you need to "spend less time learning English" because you can name your variable "über_schwellwert" instead of "exceeds_threshold"?! Come on.
- squaresmile 8y agoI think it would be great if people don't have to learn English to program. There are tons of people out there using computers, programming with very very poor English knowledge. Besides technical implementation issues, I see no reason to oppose allowing them to name things in a language they are more familiar with. Of course you can keep using ASCII strings for your program but they should be able to name things however they like too.
- adwn 8y ago> I think it would be great if people don't have to learn English to program. But that's the point – you'll still need to learn just as much English when you have Unicode identifiers as when you only have ASCII identifiers.
- hyperpape 8y agoThe rules for unicode normalization only make a difference when you use them. As an English language programmer, they'll probably never affect you, and you're free to use your linter to require all code in your projects use only ASCII identifiers, just to prevent any potential problems. Perl apparently handles this well: you have to declare that a file uses a particular script if you're using non-ASCII identifiers.
- kazinator 8y ago> you have to declare that a file uses a particular script So, no calling functions in other files that use other scripts? A reasonable restriction is to demand that all characters in any one identifier are from the same script, and that purely typographical devices such as ligatures are banned.
- hyperpape 8y agoIf you’re calling from another file you edit the pragmas in the file you’re calling from. Seems easy enough. I actually am not quite clear on the details: one source made it sound like a limited set of scripts was enabled by default. Perhaps someone who knows Perl better can clarify.
- kazinator 8y agoIf I'm in a Japanese file and want to call a function in a Greek file, I don't see how I can avoid writing a Greek identifier in the middle of the Japanese.
- hyperpape 8y agoYou can list multiple scripts: use utf8 ("Greek", "Cyrillic"); This took me a while, but I see how my original post was ambiguous.