5 ms·
To non-native English speakers, who often write variables and function names in their language, the language difference between keywords and the rest of their p
by ridaj 5y ago
To non-native English speakers, who often write variables and function names in their language, the language difference between keywords and the rest of their program acts as a kind of pseudo syntax highlighter: it's very easy to spot language keywords because they're in English.
Secondly the keywords don't really have any strong prior meaning to overload, so in a way they're more "pure" cognitively and easier to grok. The word "for" in everyday English really has nothing to do with "iterative loop with variable definition", the word "use" has nothing to do with symbol imports, but that's all it means to a non-English coder.
Now libraries are another thing. Typically they start using higher level abstractions that start to map to everyday constructs (eg, in a drawing library you might find things like "stroke width" which are trivial to understand for a native speaker)
- makeitdouble 5y agoFor a lot of new shops in at least western countries, writing everything in english is becoming the norm, including technical docs and comments. The two main points I’ve seen are: - it’s a daily pain to handle two vocabulary sets and lead to undue errors and bugs. When you have a “FishingBoat” class which related to a “boat” table and all the documentation points to “Bateau de pêche” and “barque” it’s 2x harder to follow things. Then people will accidently translate “bateau” to “ship” and it slips through a few reviews of mostly independent features, and you’ll have both words in the code base before you realize. - it becomes a swamp the day a non native speaker touches your code base. For instance you need to share part of it with a company next door that happens to be the other side of the border. Or you ask a Romanian dev team to port your code to another platform.
- smashed 5y agoYes, that is a huge problem I have seen often here in French speaking Quebec. Developers will prefer all the code in English, because the libraries and language keywords are in English and it is thus more consistent. This leads to business domain objects to be translated in English by the devs and they will make different or incorrect translations. Then, all the stakeholders and requirements will be in French. All developers need to constantly map the real world names to the English names used in the code base, but that nobody else uses. This leads to bugs, inconsistencies and extra cognitive load. It comes back to how hard "naming things" is.
- ridaj 5y agoYes and it makes sense because great software eventually becomes worth internationalizing. If you start with a non-English code base and documentation, good luck translating that.
- curryst 5y ago> Secondly the keywords don't really have any strong prior meaning to overload, so in a way they're more "pure" cognitively and easier to grok. The word "for" in everyday English really has nothing to do with "iterative loop with variable definition", the word "use" has nothing to do with symbol imports, but that's all it means to a non-English coder. I would disagree with this. A lot of programming keywords have enough context to help new people. I.e. "for" or "forEach" maps almost perfectly to English. "For each friend you know, call them and ask what their birthday is and what kind of cake they like". friends.forEach(friend => { friend.askBirthday(); friend.askFavoriteCake(); }) While loops are the same way. "While there's still boxes on the truck, you need to be moving those boxes". It requires some slightly awkward contortions, but you can phrase English so that it somewhat resembles code. "Use" and "import" both also have relatively clear parallels in English. import meaning bringing something from a foreign space into your own, and "use" being equivalent to using a tool. English is my only real language (other than horribly botched Spanish) and the similarities to English really helped me when learning Python. Both in understanding and just simply remembering the keywords.
- ridaj 5y agoYes for python and others whose syntax matches the language more closely. Now as for languages that talk about "virtual" "methods" of a "class"...
- chefandy 5y agoI think those terms are related— first entries for those terms in Oxford Languages: method: "a particular form of procedure for accomplishing or approaching something, especially a systematic or established one." class: "a set or category of things having some property or attribute in common and differentiated from others by kind, type, or quality." I agree that virtual is a little shakier, but: "almost or nearly as described, but not completely or according to strict definition."