r/computerscience • • Nov 18 '19

How do programming languages work in different "people" languages?

I've been doing code for some time now, and I just recently got back into learning Spanish. At some point, I realized how incredibly difficult it would be to code C++ the way I do if I didn't speak English as a native language. Does each programming language have its own human-language variant?

168 Upvotes

51 comments sorted by

17

u/[deleted] Nov 18 '19

43

u/Themonstermichael Nov 18 '19

Thanks to you, I know of a Spanish based language meant resemble c/c++, and it's called Sí.

That made my life better, so thanks

26

u/PalepGame Nov 18 '19

Omg the pun

5

u/[deleted] Nov 18 '19

Cool!!

3

u/Yamaste2u Nov 18 '19

FREEZE, DO NOT MOVE! r/PunPatrol

165

u/rock1998 Nov 18 '19

Nah man you gotta speak English or you gotta go home (also native German)

55

u/[deleted] Nov 18 '19

Exactly. If you can't speak English, too bad, gtfo. And I love it!!! This way we have equal language for stuff like technical documentation etc.

2

u/[deleted] Nov 19 '19

Don’t most German tech/engineering companies all work in English?

151

u/Lexibuhh99 Nov 18 '19

If it answers your question, I’m studying computer science in Germany and all the programming languages are in English so if you don’t speak English you won’t get very far with your degree

20

u/Jaizoo Nov 18 '19

Germany and all the programming languages are in English so if you don’t speak English you won’t get very far with your degree

Same. The sad part is the level of English displayed in many classes. Most of my assignments are literally a handful of english google searches.

49

u/[deleted] Nov 18 '19

In most languages, you've just got to remember the meaning of key "words",

e.g. int; double; string; public; private, etc

From what I'm aware, the compilers all use 1 version of the code. So English.

Some IDEs can change it for me more language appropriate. But the few foreign coders I've met all just use English.

Comments can be in whatever language tickles you best though.

16

u/[deleted] Nov 18 '19

In most languages, you've just got to remember the meaning of key "words",

e.g. int; double; string; public; private, etc

That's a good point. Even as a native English speaker, at some point, you learn those keywords and their meanings just as you would with any other language. The words may be derived from English, but that's where the association ends. So aside from maybe familiarity and inferred context (e.g.: "private", "string"), it shouldn't matter much which language you start with.

4

u/[deleted] Nov 19 '19

yes i agree. i bet most did not know what an enum, a struct or even a thread means etc in the programming context. we had to learn it.

7

u/SafeForWorkLife Nov 18 '19

It depends. Some languages have a intermediate step. Microsoft does this, so it compiles to an intermediate language. This is why VB and C# can work side by side.

2

u/ziltiod94 Nov 19 '19

Seems like third party packages would be the biggest issue. Java doesn't seem to have a huge vocabulary, most of which is fairly primitive (for, which, class, new, etc.), but packages you include in your software can be much more specific, and I would think are mostly written in English (as industry standard).

31

u/purleyboy Nov 18 '19

Many years ago I worked for a Cobol Compiler company, in the Japanese group. The language keywords remain english, but identifiers can be anything in Unicode. Hence your identifiers can be in Japanese. I had to debug some programs provided by customers - I do not speak Japanese.

6

u/tcpukl Nov 19 '19

When the PlayStation sample code is first released all the comments are in Japanese. So I always had Google translate at hand.

4

u/enbacode Nov 19 '19

This lol. I worked for a company that had coded in german in their early years and only switched to english later, however as they were doing ERP systems, there was a lot of german legacy code. One day, one of our customers decided to bring in a polish developer team that coded in polish, so the code base was a big mess of german, polish and english variable names and comments.

Happy I quit that job.

1

u/msh07 Nov 19 '19

SAP? xD

1

u/enbacode Nov 19 '19

Dynamics NAV. Same shit though

23

u/caffeinated_puffin Nov 18 '19

Ive seen my cousins code and it looks the same as in english but he writes all the comments in his language. So maybe its just comments that are different?

5

u/Soulflare3 Nov 19 '19

You can comment in any language, comments are ignored by the complier. The commands and functions need to be in the correct language however.

7

u/[deleted] Nov 18 '19

From what I have seen with international students studying together, they describe everything about the language as if it were "Spanglish". In other words, they will maintain the English word for something like String or Boolean but describe it in their own language. It really doesn't matter if you know the language that these terms come from as long as you understand what they mean

3

u/biolinguist PhD Student: Computationalist Cognitive Science Nov 18 '19

All programming languages share a common mathematical underpinning, and much of it (barring issues of compositionality and semantics) are shared with natural languages. The differences usually work out to expressive power of the type of grammar under consideration.

3

u/wsppan Nov 18 '19

Do the Chinese use unicode with a unicode compiler for their code or are those English as well?

2

u/OVSQ Nov 18 '19

My experience from Taiwan, PRC, Korea, and Japan - they all code with the vanilla English compilers and assemblers. I once had to buy a computer in Sweden that had Swedish Windows installed and even in Sweden, I was the only engineer that wasn't using native English Windows. Even then we were all compiling with the vanilla compilers.

1

u/SingularCheese Nov 19 '19

You don't want to type code in Chinese. You never know does two characters that look mostly the same actually have the same Unicode encoding, or maybe one is traditional and another simplified, and you tear your hair out wondering why the code suddenly doesn't compile. Or when you just accidentally switch from English to Chinese (often one shift key away) and wonder why the compiler expects a semi-colon before the character ;.

2

u/Atria09 Nov 18 '19

As a Polish native speaker I can say that (at least at my uni) using only English is considered a good practice. Although there still is, after more than a year of the course, a small number of students in my group that uses Polish in their code, that number is decreasing quickly. Unfortunately some professors tend to mix both languages while naming variables/functions etc and we can't argue with that. What's interesting to me is the way we pronounce words like "char". I know at least three different ways polish people say that, besides the proper english version. Actually none of them is made using Polish pronunciation rules.

3

u/OVSQ Nov 18 '19

I think it is wise - for example we have a team in Poland that does really good work, but our company is based in the USA and uses 100% English for official technical implementation. Anyone in Poland that was not willing to code in English would simply not qualify for the jobs we have there.

2

u/DoubtfulGerund Nov 21 '19

I’ve heard at least two different versions of Char, regex, and tuple from native English speakers.

1

u/OVSQ Nov 18 '19

Interestingly I have worked with computer programmer customers from all over the world at least all over the Northern Hemisphere - e.g. most of Europe, most of Asia, most of North America, but literally never in a Spanish speaking country.

1

u/[deleted] Nov 18 '19

What about Chinese or Japanese or Russian???

I don’t understand how any of that would work. Is it in English or C++ in Korean?

1

u/TheMostLostViking Nov 19 '19

I can speak for Japanese. There exist Japanese version of languages, I think one for C++ exists. But in general they all just use English. Even things that could be Japanese, like vars or whatever, are English.

2

u/[deleted] Nov 19 '19

I find that impressive, people learning English because they have to. I am very spoiled that English is my first and pretty much only language. It’s effing hard to learn another language when the majority of stuff is English.

1

u/MayorOfBubbleTown Nov 18 '19

Some programming languages have preprocessors available to translate from code written in another language to code that will compile in an English compiler. A couple have different language versions like BASIC or Citrine. There are also a handful of programming languages that don't have an English equivalent. Sometimes people can name identifiers in their native language and just use the English keywords but many compilers and interpreters don't support Unicode characters in identifier names. Most people just learn English.

1

u/[deleted] Nov 19 '19

They're the same everywhere and personally I love it. Stardardization is what allows us to build huge communities around the entire world contributing with open source code, free software and other stuff alike. I'm from Brazil, btw.

1

u/Sedmo Nov 19 '19

Take a look at stack overflow in Spanish and you'll see

1

u/[deleted] Nov 19 '19

This question is really interesting, I’m Mexican and I’m getting my degree on CS.

My CS classes are in Spanish since the concepts are language independent.

But for programming... I’ve seen people able to program without really being able to speak English, they just learn the translation of the reserved words, and the variables names are on Spanish. Some others prefer just writing code in Spanish even when they know English.

Speaking for my self I do write my code in English but I’ve developed an ability to read English code to Spanish directly, so when I’m coding I think in Spanish but write in English lol

1

u/tcpukl Nov 19 '19 edited Nov 19 '19

Isn't it just learning what the key words mean though? Knowing an English meaning only gets you so far.

I mean how does knowing what protected means in English supposed to help?

Or float or double? In fact float is confusing because they are decimal numbers in English.

Integer doesn't mean anything until I started programming either.

For doesn't really help either.

While is even used differently in North England.

For comments though... When the PlayStation sample code is first released all the comments are in Japanese. So I always had Google translate at hand.

1

u/Suuirad Nov 19 '19

It’s all English here (Germany) too. But because every German learns English very early as secondary language the most don’t have a big problem with that.

Tough I think the German language would be very funny for programming languages, imagine a „Ganzzahl“ or a „Fließkommazahl“ instead of integer or double.

1

u/[deleted] Nov 19 '19

I'm brazillian and it wasn't that hard for me learning new programming languages since I can speak english. But I guess for others who don't might be more difficult.

0

u/[deleted] Nov 18 '19

[deleted]

1

u/OVSQ Nov 18 '19

Yeah - in my experience, even in meetings with entire teams were everyone but me is English as a second language, they will speak their native tongue for business, but then switch to English for technical matter. Which is perfect for me not having to tune out the business nonsense.

-16

u/[deleted] Nov 18 '19

[removed] — view removed comment

6

u/rock1998 Nov 18 '19

Found the American

6

u/Themonstermichael Nov 18 '19

We don't own him

2

u/Bottled_Void Nov 18 '19

I'm from a weird country. Luckily that's England and it hasn't been a problem so far. Well, with the exception of colour... I mean color (I guess).

3

u/[deleted] Nov 18 '19

That’s exactly what someone from a weird country would say

2

u/Jaizoo Nov 18 '19

There's two things to mention here:

At least we have social healthcare here.

And our politicians aren't unsuccessfully trying to leave the EU. Yet at least.

It's not too strange here.

1

u/[deleted] Nov 18 '19

Made me laugh. Take your upvote and leave.