7 ms·
As a native french speaker, I feel so uneasy reading source code in french. It feels very very uncanny. I've often wondered if English native speakers feel the
by fouronnes3 11mo ago
As a native french speaker, I feel so uneasy reading source code in french. It feels very very uncanny. I've often wondered if English native speakers feel the same when reading normal source code which is always in English. They probably don't. But how? I've always associated the "other language-ness" to correctness and technicality. It must be so weird to code in your own language. Feels like reading bad pseudo code. It's very nice to be able to map "english" to "technical, correct" and "native language" to "descriptive, approximate, comments, pseudo-code". Having only a single language to work with is like removing a color from the rainbow.
- wiether 11mo agoSalutations, I always felt the same and one theory I have is because the imperative nature of source code feels rude if you try and put it in French. It feels like yelling orders to a dog. Then I don't know if it's just because in French, despite everyone calling us rude, we are usually quite polite. Or if it's the same for every ESL.
- silisili 11mo agoAs an American...no uncanniness to English. I guess because it was always the default and what was taught. The first time I encountered a non English PL, I did feel the same uncanniness you spoke of. It felt... wrong? I wish I remembered which one it was. It was probably the first time I realized how prevelant English was, and that PLs could even be written in any language .
- croisillon 11mo agoi thought the verbs in English-programming were meant to be infinitive and not imperative?
- mr_toad 11mo agoMost programmers probably don’t even know what that means.
- kubb 11mo agoIt looks more elegant than English.
- resonious 11mo agoI'm a native English speaker. I do actually remember programming languages feeling a little uncanny at first. Like you can tell that it's "computery" and that the language author tried to make it English-like and only sorta succeeded. So I think at this point, for me, programming languages just aren't English. One odd thing I've noticed is that in Ruby the `unless` keyword confuses the hell out of me, and yet when speaking English I never get tripped up on the actual word "unless". So I guess it's handy that the keywords in programming happen to be English words, but my comprehension of programming languages seems to occupy another region of my brain.
- bionsystem 11mo agoI'm quite fluent in english and "unless" is also weird to me, for some reason, "when" in ansible is also very weird, I don't know why. Back to the original post, I would never work for my (French) government again if they adopt something like rouille ; just reading the README felt very weird.
- galangalalgol 11mo agoBut rust lets you use unicode for identifiers. Just make every variable its own greek letter. Or Tamil, plenty of languages available. Why waste screen space by using entire words? That is mostly sarcasm, maybe? Didn't someone say something about using French to speak of love and german to speak of science? Maybe english is getting it's use.
- zozbot234 11mo ago> But rust lets you use unicode for identifiers. Just make every variable its own greek letter. This can actually be useful for locally-defined variables. Even more so if you're using an editor with LSP support where it's trivial to bring up the doc comments for an identifier as a tooltip - with some added support, you could even write these doc comments in multiple natural languages, while keeping the code itself quite linguistically neutral.
- mr_toad 11mo ago
- _notreallyme_ 11mo agoAs a native french speaker, I have the same feeling when reading code written with french keywords, except that since I learned boolean and arithmetic in french, it makes more sense to me to read them in french. As others have pointed out, it seems to only be a matter of how you learn to read and write code. For comparison, in mathematics I learned to read all the symbols in french, and only learned their english equivalent much later, so it feels uneasy for me when i read their english version. So it is clearly a matter of habit that took its root when you learned reading.
- lordnacho 11mo agoFor anything vaguely technical, I use the English term. I don't feel comfortable in any other language, no matter how well I speak it. It just doesn't sit right with me to use eg a Danish term for density, or power, or eigenvalue, or anything programming. Part of it is that even though I might know the term, it won't be long before I need to bring in something where I don't know the term. At that point I'll be inventing a local term, when I know what the English term is.
- nkrisc 11mo agoThe words may be English but it doesn’t feel like English at all because it’s but structured like natural language.
- vor0nwe 11mo agoIn this particular case, it might also feel uncanny because the keywords were merely translated; but the grammar (most notably word order) doesn't (always) match. `asynchrone fonction` feels wrong because it's the wrong word order for French; it should be `fonction asynchrone`...
- lgeorget 11mo agoYes it's so strange, like bad and unreadable pseudocode. I could see myself coding in Latin though: https://github.com/pianoman911/ferrugo https://github.com/pianoman911/ferrugo. Something about the prepositions tickles my brain the right way.
- 9dev 11mo agoFor real though! I could get used to &ipse.
- agumonkey 11mo agoIt is uncanny but in that case I had a fun feeling reading usual abstraction (maybe types, self traits) in French, it tapped into a different part of the brain, that helps thinking about what the code means less mechanically
- SwiftyBug 11mo agoI'm a native Portuguese speaker. Here, when people are first starting to learn programming, it's very common for them to write code in Portuguese. For example, they would write this simple age verification algorithm: int verifica_idade(int idade) { if (idade < 18) { return -1; } return 1; } int main() { int idade; scanf("%d", &idade); int verificacao = verifica_idade(idade); if (verificacao < 0) { printf("Acesso negado\n"); } else { printf("Acesso liberado\n"); } return 0; } Do French (or other languages) speakers also do this?
- fouronnes3 11mo agoYes we do this while learning programming. Then it quickly becomes a sign of being a novice programmer that we look down on.
- nxor 11mo agoShould it be looked down on?
- hiccuphippo 11mo agoI think so. You don't know who might touch your code later, better to use English than for them to figure out what those words mean. It would be like using giberish for all your variables. Another issue, even for other speakers of your language, we don't all translate english words the same, some words are just not translatable and some words look the same but mean different things, how can they tell if it was meant to be English or not? For example in Spanish, "default" translates to "por omisión", two words, there's no single word for it, a lot of people translate it to "defecto" because it's similar but that means flaw, defect. It's so used, people say "por defecto" instead of "por omisión" now and some dictionaries added it as a translation already. Another example, "cache", I know its meaning in computer lingo, the times I've had to use it is in the context of computers, so I have no idea what its translation to Spanish is or if there's even a word for it. If someone used the translation in code I would have no idea what I'd be looking at. One more, "library" translates to "biblioteca" but some people use "libreria" (bookshop) because it sounds similar. You can find usages of both in documentation. People will probably understand both but it hurts searchability.
- KineticLensman 11mo ago(Brit here) My first encounter with a foreign PL was a French Prolog implementation in the mid 80s whose only compiler error message was IIRC something like 'Erreur syntactique'. This seemed superbly Gallic, if somewhat less than helpful.
- didgeoridoo 11mo agoTwo of the best things I learned in French class (which was basically “Parisian culture of 1982” class) was that “impossible” in French meant “I don’t feel like it”, and if someone shrugged in a way where the edges of their mouth touched the top of their shoulders, you were shit out of luck with whatever you were asking for.
- KineticLensman 11mo agoOff-topic but that reminds me of the quote from "Stand on Zanzibar" where 'impossible' is defined as IIRC "1) I can't be bothered or 2) I don't approve or 3) God can't be bothered"
- graemep 11mo agoIt did not feel odd to me. Possibly a remnant of being bilingual as a child (I am not anymore, and was not by the time I learned programming later in my childhood)? I do not think I ever really thought of programming languages as being English, but English like/derived from English.
- TofuLover 11mo agoThe closest I've ever felt to this as a native English speaker is reading words in music scores in English. I'm a classically trained cellist, and grew up learning notation with Italian and French words for directions and expression. I've never learned either of those languages, save the words used in music notation. Seeing a score with those words in English just feels... wrong. Not in any big way, but as you said: uncanny. Definitely get the "bad psuedocode" vibe, because to me it English in music notation feels similar -- like the person who wrote it didn't know what they were doing, even though the notation makes perfect sense and the music is good. It removes some of the flair of the art of the notation itself for me.
- 12_throw_away 11mo agoThis is a very good analogy, sheet music with all the Italian replaced by English would be very funny. "Loud!" "Very loud!" "Super-duper quiet!" "This is the end of the song!" "play this part reallll smooootthh" etc. (Actually I believe the late P.D.Q. Bach [1] did this a lot, and it was in fact quite funny) [1] https://en.wikipedia.org/wiki/P._D._Q._Bach https://en.wikipedia.org/wiki/P._D._Q._Bach
- trallnag 11mo agoHow's Microsoft Excel for you?
- fouronnes3 11mo agoExcel is a good one, another one is World of Warcraft macros which depend on the client language because Blizzard is too good at i18n and they translated spell names which are used as spell identifiers in the UX lua code.
- embedding-shape 11mo agoI started self-learning programming from Swedish resources, using Swedish variable names and (trying) to store Swedish text in databases. The good news is that I learned about encoding and how to store "åäö" properly early on, the bad news is that it was really difficult to ask questions on Stack Overflow when your PHP is 50% Swedish and 50% English. Actually entering the code into Notepad++ was difficult too, weird finger movements to get to the common "special" characters. Since them I've moved to US keyboards after starting to work with others in an office and not being able to pair program otherwise, and obviously default everything else to English too. I'm not a native English speaker, but when I come across that sort of "programmed in the country's language" programs today it does take some time to get used to the style and translating stuff while also trying to understand the logic. I wouldn't say it's a huge time-sink, but particularly names can be difficult to convert/translate on the fly when you're trying to get product and developers to agree to what we're talking about.
- gwbas1c 11mo ago> I've often wondered if English native speakers feel the same when reading normal source code which is always in English. I think that depends on if they understand how to program. For me, as a native English speaker, a computer program is not speech. In a program, there's three areas where the spoken language influences: 1: The keywords in the language: IE, "if," "switch," "return," ect. These take on a meaning in my head that is distinct from the meaning of the spoken word. "class" is a good example: Its use in programming is shortened from "classification" which comes out of category theory; but its use in English means something very different. Likewise, "if" in my head has such a different meaning in code that if "si" were used, it wouldn't make a different. IE, in code we use "class" as if https://en.wikipedia.org/wiki/Class_(programming) https://en.wikipedia.org/wiki/Class_(programming), which came from https://en.wikipedia.org/wiki/Class_(set_theory) https://en.wikipedia.org/wiki/Class_(set_theory) and https://en.wikipedia.org/wiki/Category_theory https://en.wikipedia.org/wiki/Category_theory; but in English it's commonly meant to be https://en.wikipedia.org/wiki/Class_(education) https://en.wikipedia.org/wiki/Class_(education). 2: The API names: By convention, APIs typically are English. Learning these is like learning any kind of professional lingo. I've never tried using a non-English API, and would probably struggle significantly if I had to. 3: My code itself: A significant amount of my time spent writing a computer program is making sure that my code is understandable to me and the other people who have to maintain the program. There's always going to be an "other-worldliness" to a program until someone understands the conventions and style.
- LudwigNagasena 11mo ago"Class" in the sense of classification and taxonomy is a common English word used in many contexts: working class, second class, business class, etc. Those aren't obscure concepts. I don't think it is any more weird than "if", though I am not a native speaker.
- gwbas1c 11mo agoYears ago a read an introduction to category theory, and it was very obvious that it influenced object oriented programming.
- Tade0 11mo agoThe first language I gained any proficiency in was Logo which, as an educational tool, was translated to my language and that felt to me like a 1960s understanding of communicating with an AI. I learned English via immersion as I was thrown into an international environment at age four and to me it radiated confidence as the few native English speakers there were obviously much more proficient in the language. I have a problem with the word "robot", as it's essentially a loanword from my family of languages, but I was unaware of that initially and once I've made that connection, the "coolness" faded somewhat. Strangely French to me has this same air of confidence, displayed in, among other, the French word for "computer". Truly the French copy no one, nobody copies the French.
- TimorousBestie 11mo agoL’ordinateur really should have caught on, it’s a pity. A beautiful word.
- SiempreViernes 11mo agoComputer comes from French, so they could just have settled on pronouncing it properly and gotten on with their day, but nooo, gotta invent a new word for this very old french word.
- ddkto 11mo agoMy first language was also Logo, which I learned first in English at home, then in French at school. I wonder how many languages Logo was translated into? Examples is French: https://www.tortue-logo.fr/fr/tortue-logo/exemples/ https://www.tortue-logo.fr/fr/tortue-logo/exemples/
- Tade0 11mo agoMine was exclusively in Polish because it was some kind of demo version which lacked documentation and some functions. Fortunately most commands had TLA aliases and were highlighted in the editor, so I just generated all three-letter combinations, inspected them visually and reverse-engineered what they were doing.
- CoastalCoder 11mo agoI'm curious if there was a similar dynamic when German stopped being the standard language for scientific research.
- 0xb0565e486 11mo agoI think you may be over-reading into this a bit. Seems to me as just a familiarity thing? Programming in English = X Programming in French = Y You're used to X and now it's Y. So it feels weird. English speakers are used to X and it's X. So it feels normal.
- teunispeters 11mo agoI've worked with Japanese and German code. It is definitely unfamiliar and gets me thinking a lot more about how I approach code. I'm liking your description as I keep wanting to map "english" to "technical, correct" too and this helps. thank you!
- BrandoElFollito 11mo agoNative French speaker here as well. I hate with all my heart technical places where French is fed to me without an easy way to switch to English. I then spend an unholy amount of time translating the words to English, trying to hit the right traduction. Despite loving my language and defending it in normal situations, Internet and dev is in English and this is life.