News for hackers. Stuff that matters.
Re:Natural language isn’t just English [pdf] by elfexec on Wednesday December 25, 2019 @04:33AM (#21877766)
Pages 4 and 5 ( "Languages of the world" ) of the pdf are duplicates.

I agree that NL isn't just English, but the world of computer science, information processing, AI and even linguistics is heavily english-centric for a wide variety of reasons. And unless something drastic happens ( the end of pax americana and the fracturing of the world order ), everything will get even more english-centric. The internet is spreading all over the world. American culture is spreading all over the world. And so is american/english.

I do wish CS and programming would be less english-centric. It doesn't make sense to me that people in china, russia, europe, india, etc are writing code in english. Why not translate computer languages to their native language? Given the nature of programming languages, it's so simple to do. Wouldn't it be simpler to translate C or python or java to chinese and have chinese students/programmer code in the chinese language ( mandarin )? Rather than having chinese students learn english and then learn to code in english?

Re:Natural language isn’t just English [pdf] by tastroder on Wednesday December 25, 2019 @05:14AM (#21877895)
I don't believe that's an inherently bad thing for the development world. As a non native speaker I can recall quite a few situations where my native language has annoyed me in the context of coding to no end. Just to randomly pick two:

Microsoft Excel translated (still might, no idea) their function names and internationalised stuff like floating point numbers. That might be beneficial for some parts of the user base, for me it meant broken spreadsheets, broken data. That might still be a thing today and working fine but if it is, it's just another days point to show that it's an investment and not some easy to add mechanism.

The second one is mostly programming language independent. There's been quite a few times where I tried to onboard developers into legacy code bases developed fully by German language teams (read: German comments, tickets, documentation) and it's a pain. It served no purpose other than catering to the lacking English skills of some team members while essentially blocking the possibility to bring in talented outside help.

I like that English has become the common language of our industry, the alternative just compartmentalizes information without much apparent benefit.

Re:Natural language isn’t just English [pdf] by stoicShell on Wednesday December 25, 2019 @11:46AM (#21879221)
Oh my, don't get me started about Excel localization.

It played a big part in my decision 20+ years ago to switch all my computers (any electronics actually) to US/English locale. Years later when I began programming seriously, I switched to a US-ANSI QWERTY layout — never looked back.

The premise is simple and just works:

- remove all friction (cognitive bloat) with foreign knowledge (blogs, docs, books, vids, courses, etc) because I don't have the additional step of translating, or rather guessing which snowflake word some engineer of my country thought was a good idea.

- avoid waiting for translations, which may never come (been there, done that, burned by JP/US video games in the 1990's never making it to the EU, thank you very much... not). Currently this usually means a lag of anything between 3 days and 3 months to get features from US app stores to EU ones. Some features never make it past the English world (Amazon is very bad in this regard, the whole Alexa offer is much lesser outside the US in my experience).

- I'll go one step further thus, and submit that even documentation, while written in local language usually, should at least retain English terms for fixed, known things — do not translate already formalized concepts like "reverse proxy", acronyms like DNS, cultural concepts like Agile or devops. It just makes it much, much harder for everyone to know what we're talking about, and to relate to the English world (makes your country, locale, a silo, which is bad-bad). Ideally, you'd write documentation fully in English, and optionally have a localized translation when it can't be avoided (regulation, compliance comes to mind).

I love that there is a common language in our industry; which one is a distant concern (although I love English more than my mother tongue, so there's that for me).

Re:Natural language isn’t just English [pdf] by yorwba on Wednesday December 25, 2019 @06:00AM (#21878026)
> It doesn't make sense to me that people in china, russia, europe, india, etc are writing code in english. Why not translate computer languages to their native language?

It doesn't make sense to them to cut themselves off from the English-based open-source ecosystem just so they can use their native language when they already know enough English to get by.

Many programming languages already support Unicode identifiers and nativist movements exist (e.g. [0]), some people produce interesting mixed-language programs (e.g. stdlib in English, other identifiers in Chinese with Latin prefixes to indicate type: [1]) but it's overall a very small niche, because most people can see the value of being able to share code globally, which means using English.

[0] https://github.com/program-in-chinese/overview/

[1] https://github.com/cflw/cflw_py/blob/master/%E7%A8%8B%E5%BA%...

Re:Natural language isn’t just English [pdf] by elfexec on Wednesday December 25, 2019 @06:25AM (#21878075)
> It doesn't make sense to them to cut themselves off from the English-based open-source ecosystem just so they can use their native language when they already know enough English to get by.

Just because they develope their own chinese-based open-source ecosystem doesn't mean they have to cut themselves off from the english-based one. But by using the english-based one, they are cutting themselves off of their potential native chinese-based one.

My point is that it would be easier for chinese people to develope in their own language. I'd consider it silly if I had to learn chinese or greek just to program "hello world".

> because most people can see the value of being able to share code globally, which means using English.

You could share code globally even if the chinese code in mandarin. You can translate code from chinese to english and vice versa. It would be even simpler in assembly.

Also, there would be more code overall if programming didn't have an added hurdle of having to learn english in the first place. If people around the world could code in their native language, we'd have more programmers and more code.

Using your argument, the chinese should write their novels in english too. But everyone would consider that absurd. That's the same for programming. It's an absurd system that exists, but hopefully things will change in the future.

Re:Natural language isn’t just English [pdf] by yorwba on Wednesday December 25, 2019 @07:40AM (#21878269)
> Just because they develope their own chinese-based open-source ecosystem doesn't mean they have to cut themselves off from the english-based one. But by using the english-based one, they are cutting themselves off of their potential native chinese-based one.

So does using one language cut one off from the ecosystem of another or does it not? In practice, this depends on the prevalence of bilingualism: few English-speaking developers know Chinese, but most Chinese-speaking developers know English. So using English doesn't cut them off (because they understand it) while using Chinese cuts everyone else off.

> You can translate code from chinese to english and vice versa.

And who do you think is going to do that translation? Someone who understands the program in question and knows both human languages well enough to translate between them. In most cases, that will be the developers. They're saving themselves a lot of hassle by just writing it in English to begin with.

> Also, there would be more code overall if programming didn't have an added hurdle of having to learn english in the first place. If people around the world could code in their native language, we'd have more programmers and more code.

People around the world can code in their native language. I linked to projects that are all about programming in Chinese. That there isn't more Chinese code should tell you something about the priorities that Chinese programmers actually have.

Re:Natural language isn’t just English [pdf] by thrower123 on Wednesday December 25, 2019 @07:13AM (#21878199)
The problem with Chinese, in particular, is that despite unicode and additional software for input, the language is terribly unergonomic to use.
Re:Natural language isn’t just English [pdf] by stoicShell on Wednesday December 25, 2019 @11:54AM (#21879264)
It's no wonder why the latin alphabet got chosen, the same reason why it became popular in the first place, thousands of years ago. It's just efficient to use 26-ish letters, like numeral systems are easier to manipulate with 8~12 base digits.
Re:Natural language isn’t just English [pdf] by zzzcpan on Wednesday December 25, 2019 @08:13AM (#21878365)
> It doesn't make sense to me that people in china, russia, europe, india, etc are writing code in english. Why not translate computer languages to their native language?

It doesn't make sense to you, because people are not writing code in English, they are writing code using a set of characters, only some of those characters and some keywords overlap with the English language, namely latin alphabet and those keywords have different distinct meanings, than what they mean in English. Furthermore, most of the characters, including the latin alphabet, already have a significant part in every education system in the world. People are taught latin alphabet, some keywords and most of the operators you see in programming languages at school in math and physics classes. So, how in the world would it benefit anyone to have programming languages with non-latin alphabets? It can only make things a) harder to learn, because there is no utilizing familiarity with other fields people already studied and b) harder to share code and knowledge, because other people in the world can't read and input your non-latin characters.

By the way, this is the same stupid idea that got people to allow unicode variable names in programming languages.

Re:Natural language isn’t just English [pdf] by TazeTSchnitzel on Wednesday December 25, 2019 @11:18AM (#21879078)
Programming languages are in English though. The keywords are pulled from English, the names of functions are clearly made up of English words, the documentation is in English first and often only English, the untranslated error messages are in English, the filenames are in English. Already speaking English is a massive advantage in understanding and working with all of that.
Re:Natural language isn’t just English [pdf] by zzzcpan on Wednesday December 25, 2019 @12:11PM (#21879363)
Keywords, names, filenames don't retain their meanings from English, so it's not important where they came from. And error messages use the same few English words, but mostly all those keywords, names, filenames. Documentation available in local languages is the only important part here. But documentation and other reading materials is an issue for people who are already many years in programming and the deeper they go into the field, the more necessary it becomes to learn English.
Re:Natural language isn’t just English [pdf] by stoicShell on Wednesday December 25, 2019 @12:04PM (#21879323)
> Already speaking English is a massive advantage in understanding and working with all of that.

I think we're past that, it's become a de facto prerequisite now. You just can't become a programmer without at least written comprehension. You'll learn English anyway as you learn programming; but you'd do yourself a favor to double down — my suggestion: immerse yourself as much as possible, switch all your systems to English, watch only English TV, video, music, books, articles, etc. After 3-6 months, most people reported to me a "huge" leap forward, and within 2 years they can watch most TV un-subtitled (live shows are harder because less scripted, less grammatically formal I suppose, more idiomatic).

In terms of programming and tech in general, a keen understanding of English helps understanding much of the subtext, the intent, the "between the lines" meaning of techs, concepts, namespaces.

The same is true in some martial arts: in some countries, they have you learn only the original (say, Japanese) name of a technique. The problem is that it's hard to remember, it means nothing, it's just a burden; whereas it literally usually means simply what it does: "wrist torsion", "quick stun hit", etc. It may seem nothing but taking the time to translate all of it (at least), understand the language (at best), tells you a lot that you never hear because, well, it's obvious to those who speak it, and oblivious to those who don't. Cultural barriers are most confounding when they are invisible, unbeknownst to us.

TL;DR; English is almost necessary to be autonomous in programming and tech in general, even if you can learn without you just won't be able to navigate such a fast moving landscape and make deep sense of it.

Re:Natural language isn’t just English [pdf] by elfexec on Wednesday December 25, 2019 @07:44PM (#21881331)
> It doesn't make sense to you, because people are not writing code in English

What language are they writing in? What language is C, Python, C++, Java, C#, etc written in? Chinese? Greek? French?

> they are writing code using a set of characters, only some of those characters and some keywords overlap with the English language, namely latin alphabet and those keywords have different distinct meanings, than what they mean in English.

Care to name a keyword which has a different meaning in English? Also, every programming language is written in the american/english alphabet, not the latin alphabet. The old latin alphabet don't have the same letters as the english alphabet.

> People are taught latin alphabet, some keywords and most of the operators you see in programming languages at school in math and physics classes.

That's my point. It's simple. Why not just translate the programming language into their own native language. That way, people who don't know the english alphabet or the language can write code?

> So, how in the world would it benefit anyone to have programming languages with non-latin alphabets?

We already write in non-latin alphabet - the american/english alphabet. And you are missing the point. I'm saying that programming languages should be translated into french, swedish, russian, chinese, etc. Native languages, not necessarily just the script. As you noted, a programming language consists of a few keywords and operators. It's wouldn't be that difficult to translate programming language and code into people's native language.

> It can only make things a) harder to learn, because there is no utilizing familiarity with other fields people already studied

It's simply not true. Imagine if every programming language was in chinese or russian or french. Would it make it easier or harder for me as an native english speaker? It would make it more difficult for sure.

> b) harder to share code and knowledge, because other people in the world can't read and input your non-latin characters.

You can easily translate code. After all, you noted that it is just a few keywords, operators, etc.

Using you logic, no other language should be used other than english. All literature should be in english. All music should be in english. Is that what you are advocating? Imagine what we'd lose in knowledge and culture? Imagine what we are losing because billions of people are not able to program because one language dominates programming.

> By the way, this is the same stupid idea that got people to allow unicode variable names in programming languages.

This should tell you that people should program in their own native languages...

Re:Natural language isn’t just English [pdf] by ben_w on Wednesday December 25, 2019 @05:02AM (#21877853)
What do you mean by “translate computer languages”?

The reserved keywords, like ‘class’ or ‘if’? That might be easy, though I won’t be surprised if some natural languages will have multiple forms of those keywords depending on numbering or word-gender.

The function and class names in the standard libraries, like UITableViewController or String.toUpperCase()? That’s harder, and would have to be manual to avoid the “water sheep” problem (hydraulic rams). Also: does Chinese have the concept of upper/lower case?

Or do you mean the entire documentation, which is sometimes lacking useful details even when it’s only written in English? That’s not going to be possible automatically, and when it is, software developers will be obsolete because business speak could be translated into code without us.

Re:Natural language isn’t just English [pdf] by int_19h on Wednesday December 25, 2019 @08:06AM (#21878349)
Translating programming languages was tried. Indeed, when ALGOL was originally designed, that was one of the reasons why its keywords were standalone "symbols", completely distinct from the letters they consist from. The idea was that a particular representation language could choose different representations for those "symbols" - and one obvious option was to use the translated words.

Here's an example of an Algol-60 program in Russian representation: https://i.imgur.com/9edem3y.png

This was also done for Algol-68, and some Pascal dialects. But the practice has mostly died out once newsgroups and Internet became widely accessible. There's honestly very little upside to translating keywords and identifiers, because learning words is the easiest part of learning any language (grammar is much more complicated). And you don't actually have to learn the original meanings of words, either - you just need to know what they mean in programming context. In fact, not knowing the original meaning can be beneficial sometimes, because it can prevent poor understanding due to false equivalence or poor metaphors.

But there's considerable downside in not being able to understand or reuse snippets from another language...

TL;DR: we tried - it's not worth it. English FTW.

Re:Natural language isn’t just English [pdf] by rockinghigh on Wednesday December 25, 2019 @12:54PM (#21879615)
> It doesn't make sense to me that people in china, russia, europe, india, etc are writing code in english.

English is the native language for 15% of European. Most European know more English that you need to learn these programming languages. C has only 32 keywords. You can name variables, structs, or functions and write comments in your native language.