3 ms·
Because people in non-English-speaking countries are perfectly within their rights to name source code entities in their native language instead of either havin
by Sharlin 7y ago
Because people in non-English-speaking countries are perfectly within their rights to name source code entities in their native language instead of either having to mangle words into ASCII representations (possibly even leading to ambiguities in case of near-homonyms that have identical ASCII bastardizations!) or being forced to awkwardly translate domain terminology into English which is a task that may be any of the following: a) against organization policy, b) not what programmers are paid to do, c) lead to ambiguous or outright misleading translations, d) require good English skills from anyone touching the code, e) make documentation more difficult, f) present unnecessary hurdles when onboarding new people to work on the code.
- cjfd 7y agoSure, everybody has 'rights' but if I were to come across a workplace in my country where programmers were using much of our native language in the code I would consider it a red flag and I would expect to find amateurish practices in other places as well. The thing is that English is the lingua franca of programming and that ASCII is the lingua franca of source files. The highest quality manual that you are going to find is in English and stack overflow will answer your questions in English. Also, various tools are going to respond to non-ASCII characters in various ways which may not always be the most pleasant. You are bound to get yourself some problems that you would not have gotten otherwise.
- Sharlin 7y agoSure, you could consider it unprofessional, but I'd wager that the large majority of all professional programming is done in languages other than English. The tooling issue is an "is vs. ought" problem. In 2019 full UTF-8 compatibility is not a feature anymore; on the contrary, a lack of support is a bug.
- lenkite 7y agoDo you have any citation on that ? From what I know the vast majority of all professional programming is done in English. Even companies like SAP that had a lot of programming in German have shifted to programming in English.
- pasabagi 7y agoI'm an english native speaker, so on the one hand, I'm glad english is so common in programing. On the other, I can't help but wonder, aren't other languages actually better for the job at hand? Chinese, Japanese kanji, or to a lesser extent, Hangul, all have this kind of awesome mix of concision and expressiveness. I'm not really a language guy, but I've been tempted to learn chinese just for this reason. It also has a really cool feature of being much easier to read than to write - which makes a certain level of 'reader-first' coding practice built into the language itself. You could cut down on the number of sigils, line noise, even play around with different ways to organize source code (there are, for instance, palindrome poems written in chinese that use two dimensions, which would be basically impossible in english).
- aarroyoc 7y agoFor me it seems bad to design some systems in English like public administrations software or following a law very closely (there are even no translated concepts in things like taxation and legal system) and data exchange formats should be in the language it matters (for example, all electronic bills in Spain are XML with entities in Spanish), so if you want a 1:1 mapping you need to use native language.
- deogeo 7y agoAs a non-native-English-speaker, the idea of having invisible bugs in code due to lookalike characters terrifies me. The allowed set of characters would have to be vetted very carefully before I'd consider non-ASCII. Edit: A small taste of what we can expect: https://i.imgur.com/k8S00sM.jpg https://i.imgur.com/k8S00sM.jpg
- fluffything 7y ago> the idea of having invisible bugs in code due to lookalike characters terrifies me. Unicode maintains a list of these characters (homographs), and Rust rejects them / warns on them.
- Sharlin 7y agoAs a Finn, I don't see how the additional characters ä and ö (which in Finnish are not umlauted a and o but separate letters in the alphabet) could suddenly cause invisible bugs like that. But I can very easily see how ASCIIfying ä and ö to a and o can lead to real misunderstandings (just as an example väärä means "wrong" or "incorrect", but vaara means "danger" (also "esker" but that's less likely to cause confusion :P) Germans might be fine with transcribing ä and ö to ae and oe but in Finnish that's not proper. Also, bugs caused by accidental homographs in identifier names are caught by any reasonable type system, just like any typos. As for your edit, you can't stop clever people being clever without code reviews anyway, no matter what the language.
- asdkhadsj 7y agoIt's inventive, I'll give them that.
- rubber_duck 7y agoI'm not disagreeing with you because sometimes it's just project requirements - but as a developer in a non-English-speaking country - the idea of writing code in a non-English language is ridiculous to me. Programming languages and standard libraries are written in English, programming terminology is invented in English, the international community adopted english as a defacto standard, almost all third party APIs expose English interfaces. Every time I've seen a project written in my native language it's been ridiculously hard to follow because the terminology is translated in various ways (there's no official or even widely used terms because hardly anyone uses native language in SW development and CS outside of academia) and it's a mish mash between languages since everything not written in the project (along with language keywords) is written in English. I don't usually take a hardline stances on things but this is one thing where it would be 100% a dealbreaker for working on a project.
- runarberg 7y agoSure one should stick with English when working on an industrial standard codebase that many people on the western hemisphere will work on. Unless off course these folks are limited to the southern continents where Spanish or French might be more appropriate. And outside the western hemisphere where off course if the code base is unlikely cross, say, outside the Chinese borders, where Mandarin would be more appropriate. Then there are non-industrial standard codebases, say a hobby project. I’m sure that somewhere in Guinea-Bissau there is a 17 year old learning Python at this moment, really happy that they can write Portuguese special characters as variable names in python 3 (if only the documentation had been translated to Portuguese). Just because English is the appropriate language in by far the majority of cases, does’t mean we should deny the possibility of not using it.