Hacker News new | past | comments | ask | show | jobs | submit login
Why is Golang popular in China? (herman.asia)
159 points by signa11 on Jan 12, 2015 | hide | past | favorite | 100 comments

The anwser is ECUG[1]: formerly Erlang China User Group to promoting Erlang programming, now days changed itself to 'Effective Cloud User Group' for a border definition.

ECUG is a online community also it host an annual ECUG conference. Golang was first presented in ECUGConf2011 by xushiwei[2], he was building a dropbox clone(qbox.com) in Golang, now qbox become qiniu.com which is the most successful S3 clone in China.

In all the tech & media hype, those success stories, and the most important reason: the Golang community itself, Golang passed its breaking point in China and getting really popular.

[1] http://www.ecug.org/

[2] http://ecug.googlecode.com/svn/trunk/ecug-con/2011/xushiwei/


Come from china, a golang user, for 2 years now.

golang.org and Google is blocked in china by government, so, Google trends and golang.org traffic from China maybe miss leading.

Go is quite popular in china, the reasons can be:

1. A few companies is based on Golang, like qiniu.com. 2. More and more companies are adopting Golang, since it's very powerful for writing network servers. These companies are facing very fast traffic growth. Golang's efficiency and expressiveness are well known. It just fills the gap. 3. China has many software developers spread in a few cities(Beijing, Shanhai, Hangzhou, etc). News spread quite effective among them.

Ah, interesting! The rapid increase in traffic for Chinese sites easily makes a lot of sense, when thinking about it!

With 1 billion users in a single language/culture, I guess successful sites might indeed grow quite fast, right?

... and there, a compiled fast language is paramount, no? :)

compiled fast is quite helpful. The standard lib is a also +1, very useful for network services.

I live in China, I think Go is becoming popular in China. Many Coders are talking about it and compare Go with Erlang or C++. In fact there are lots of debates in Chinese community about Go and Erlang such as this link http://www.zhihu.com/question/27465406. Also many programmers are talking about Go and Erlang in weibo -- a chinese website that is similar to twitter. Finally, because of the Great Fire Wall has blocked Google in China, we can't direct visit websites related to Google include http://golang.org. So many programmers are tend to visit the chinese version Go communities.

So... which one is more popular? Go or Erlang?

I hoping Erlang >___<.


It means "Yes it is." according to Google Translate.

Whoa wait a second, I feel like this is burying the lead: you can write native android apps in go[1]. I feel like that's a very big deal, especially for game companies wanting native speed, and a 'modern' language and toolkit.

[1] E.g. http://talks.golang.org/2014/gothamgo-android.slide#1

Thought it might interest you that the term is "burying the lede". One of those weird terms like "champing at the bit" or "eke out a living" that uses a word that sounds like a modern English word but is actually a slightly arcane word. In this case lede is "the introductory section of a news story that is intended to entice the reader to read the full story".

For a bunch of reading about related "evolution" of arcane words, see Language Log's archive about "eggcorns": http://languagelog.ldc.upenn.edu/nll/?cat=49

Now I'm curious. I've got 'lede' -> 'lead' and 'champing' -> 'chomping'.

What's the "modern" term in "eke out a living"?

Okay, I found it myself. Apparently the word confused for "eke" is "eek". But their meanings are so different to me that I'm having trouble seeing it!

Well I always get a chuckle when I see people talking about 'eek'ing out a living, but I kind of get it. Eek! can be an exclamation of alarm, so eeking out a living would be just barely making it in a constant state of alarm. It changes the meaning of the term but lets you use it in a contextually similar way.

It's a big deal, but it's not exactly news. It was part of the Go 1.4 release, about a month ago, and also announced well before that on the golang-dev mailing list. Both times it was discussed extensively here on Hacker News too.

Maybe github is more convinced, search Go in github and filter by language use go: https://github.com/search?l=Go&o=desc&q=go&s=stars&type=Repo... . You will find half of popular repos (stars>3000) are created by Chinese developer. And most of popular Go related project's document has complete Chinese translation.

Could it be because golang supports unicode identifiers? For non-native English speakers, it must be more difficult to program in ASCII-based languages, right?

Certainly not for that reason. Actually, as a non-native English speaker, I consider unicode identifiers one of the most useless features for a language.

There are reasons why unicode identifiers have never been widely used, and probably will never be, even though they've been around for more than a decade:

1. You're unlikely to be allowed to use them. Unicode identifiers stagger international collaboration. Do you want your Chinese colleague to commit some hieroglyphical identifiers into your code, and then an Arabic colleague to add right-to-left curvatures? I doubt that :) They are unwanted in outsourcing, freelancing, open-source, any company which does foreign hire, they are a problem when asking on StackOverflow, etc.

2. There is just no problem to use English in the first place. Programmers already use English every day. 80-100% of information (documentation, QA, discussion forums) on any programming topic is in English; native-language sources are lacking at best, often nonexistent. If person is a professional programmer, it's way too late for them to have a couple of words translated.

3. They are not as appealing as you might think. Many languages don't work the same way as English. For example, in expression `print(line)` the word `line` may have to have different morphological form than in `var line = ...`, and yet another form for `if '_' in line`; one form for all uses is very unnatural and requires getting used to (and if you're going to adjust anyway, why not adjust to English then).

4. Mixed-language text is simply harder to type when second alphabet is not latin. It's like 3x harder when foreign words need to be inserted. I have even seen colleagues discussing code in chat using English just for that reason. And since at least language keywords and standard libraries are already using English, mixed is what it gonna be. A person must have some real serious trouble with English to tolerate that.

Even in strictly local projects where all comments are in native language, unicode identifiers are rarely used.

P.S. When I was reading Swift book about unicode identifiers, I immediately thought: "first paragraph of every Swift coding conventions on the planet is going to be, don't use unicode identifiers".

I agree, but I think we live in an idealist bubble on Hacker News. Some of my freelancing clients maintain a bit of (Unicode free) English-German code.

What would you do if you had to write one of the gazillion business software systems we never see here on HN, and you had to codify boring terms like Boolean rightToGiveExtraordinaryNoticeOfTermination (in any other language)? The client/superior has not provided you with an English translation, and your English is mediocre. I can see how non-English code is the least evil in this situation.

I have also inherited outsourced code from Russia once and it had Russian (cyrillic) comments above every English identifier, so apparently some people don't mind switching between keyboard layouts while typing :)

There exist a lot of line-of-business Japanese applications which have methods like getKamokuList and getKogaishaList, either because the company didn't have a blessed translation for the noun or, in more than one instance in my career, because two concepts which were distinct in Japanese would have caused a hash collision when translated.

For example, if you do Japanese entrance exams, there exist two ways to say "academic subject": 教科 and 科目. Both of them are most readily translated as "subject", but the first is subject like mathematics is a subject, and the second is a subject like Algebra II is a subject. Make sense? Great.

Rather than littering our code with getSubject and getSubSubject, which was the cleanest English option available, we just went with the transliterations straight in the source code, and said "Look, if we pay your salary, you're going to learn the difference between kamoku and kyouka."

In the early 90's - ie before the internet cemented the hegemony of English in s/w development - some colleagues worked on a codebase that was an international collaboration between the UK, Germany and France. Each nation used their own native language identifiers for variables and functions, and there was a custom preprocessor to translate between them.

The feeling was very much that this was political far more than an aid to the programmers, although of course that was the English-speakers perspective! But it did make working with the code (which was a mess anyway) far more complicated.

Still, identifiers in the local language makes sense in some contexts. For example when working with terminology which does not have direct equivalent in English. Eg. some very specific tax-related terms with precise meaning in the local country. In that case translating to some not-quite-equivalent English term will just confuse the matter.

The work-around then is to simply write it in ASCII in the local language. Most alphabets has a de facto, often even official, romanization.

Actually trying to use hieroglyphical identifiers opens another can of worms, hieroglyphs are located outside of the basic multilingual plane and so tend break even in languages that claim to support unicode identifiers.

I have been working in big companies that do only local-language hiring, and they definitely use local business terms mixed with english programming terms in identifiers. formattedZugNummer in german or montantFacturé in french for example. Unicode is a bliss here.

Almost all of the colleagues are not native english speakers, so it does make absolute sense to not waste time translating these terms (differently!) every time.

I guess it depends how much "international" the company is.

Here's why you don't want Unicode identifiers:


(And yes, that compiles and runs on Swift using the XCode 6 beta.)

Agreed. As a French speaker (a language with only a few accents, so even ASCII is acceptable) I don't code in French anymore, even for code I know now English reader will ever see.

Almost every non-trivial programming language released after 2000 supports unicode identifiers[0]. Rust, Python, Ruby, C#, Scala, Clojure, just to name a few, all support unicode identifiers.

[0] http://rosettacode.org/wiki/Unicode_variable_names

Dart doesn't, surprisingly. I don't really mind though. It just means that I can't use non-English identifiers which I shouldn't be using anyways.

Non-English identifiers can be quite troublesome in international projects. Even if your project currently isn't, it might be in a few years. It's a maintenance nightmare waiting to happen.

And older ones such as Java, released in 1995.

Python is actually older than Java and Ruby is roughly as old as Java

Except the one implementing hacker news, obviously ;)

Speaking generally, not specific to golang, but no serious programmers will use non-ASCII identifiers. Why? I think the main reason is that it's a hassle to input Chinese characters.

You do know that there are programmers that live outside of English speaking countries that use non-standard US layout right :)



> You know that there are programmers that live outside of English countries?

I don't think the existence of sentient life outside of the US is common knowledge in Silicon Valley.

"Your name contains invalid characters"

Your name is invalid.

I think it's beyond nationalism. Programming is done in english because its the common tongue, and the world in which programmers grow is distributed and quasi-borderless, so there's interest in using a tongue common to all. There's no point in not writing code in english, it's a self defeating endeavor.

I'm from a non English speaking nation and I originally used an non-standard US layout, although I changed to US layout when I realized doing otherwise was an exercise in futility.

Sure, but China is a walled garden. English may be the lingua franca of programming, but China is large enough (and isolated enough) that Chinese programmers can likely get by without using English at all.

Even in Germany a lot of people and even companies write code in pure German, using purely German comments and variables.

(Luckily German has only 7 additional codepoints compared to ASCII).

Yes, although I think universities are partly to blame. Somehow lots of professors seem to think writing code in German makes it more science-y (probably because algorithms are generally expressed in German pseudo-code too).

Ah, a non-ASCII keyboard layout is quite different from the software input method for hieroglyph languages like Chinese.

For example, "myFile" in Chinese is "我的文件", and you have to enter the following key strokes in order to enter it: Ctrl+Spacebar, wo de wen jian, Ctrl+Spacebar.

I guess you can see the overhead.

Well...I do want to let you know that in most Chinese colleges, computer science starts from learning C.

While using in Chinese in comments might be very common, I rarely seem people using non-English identifier in actual code. If such behavior being caught on sight, I am pretty sure it will be flawed upon and be treated as evidence of being unprofessional.

so does Java...

I live in china, and haven't heard anything about go being particularly popular. It hasn't shown up on any intern resumes for systems research positions yet.

It was mentioned at GopherCon that many developers use Windows in China. Golang's ability to compile on Windows makes it a natural choice.

Most Chinese websites are built on the Windows platform [1]. Windows XP and Windows 7 have a 60.7 percent and 33.4 percent market share respectively (94% of the Chinese market) as of May 2014 [2].

[1] https://www.quora.com/Why-do-so-many-Chinese-developers-pref...

[2] http://www.zdnet.com/article/windows-os-replaceable-by-chine...

If it was primarily about Windows, wouldn't .Net or C++/Win32 be of more interest? Microsoft has no official Go support as far as I know.

> Dave Cheney pointed out on Reddit that he is under the impression that Go is popular in China for its usefulness in writing programs for rooted Android phones.

Interesting. It seems Go really is preferred to Java, if given the choice. I hope Google seriously considers making Go the main programming language for Android in the next few years. Other than having to rewrite all the old and new APIs (in parallel with the new releases) I assume it shouldn't cause too many backwards compatibility issues now that they made apps compile to the platform natively anyway, which I think should allow to rip out Java, once 95+ percent of the Android users are on Android 5 or later.

>Go 1.4 is released [0]

>10 December 2014

>Today we announce Go 1.4, the fifth major stable release of Go...

>The most notable new feature in this release is official support for Android. Using the support in the core and the libraries in the golang.org/x/mobile repository, it is now possible to write simple Android apps using only Go code. At this stage, the support libraries are _still nascent_ and _under heavy development_. Early adopters should expect a bumpy ride, but we welcome the community to get involved.

Emphasis mine.

I really don't think a beta feature that was released a month ago could have affected the statistics.

[0] https://blog.golang.org/go1.4

Well, they do make the hardware over there -- maybe they're pretty comfortable with beta software.

And besides, there was already some Android integration even before Google announced it.

That is no different than the limited NDK support for C and C++.

Check the video from Google IO 2014, Android Developers Fireside, about their opinion on alternatives to Java on Android.

If you graduate from university and work in a real company you will see that APIs, especially if given to customers, are nearly impossible to kill. You can change them a little, but you can't get rid of them, ever. I bet there is even still a significant Android 2.3 community in China as well (as I guess in most other second/third world countries). If you don't replace Android, you won't replace the Java. And even then Android will be hard thread to your new project.

> It seems Go really is preferred to Java

You can only write all but trivial apps in Go on Android, it's very doubtful that Go is preferred to Java.

google is working on a new compiler for android http://tools.android.com/tech-docs/jackandjill that will convert java code into dex. I don't see Go replacing Java for android anytime soon, if they had plans they would probably not invest in this new toolchain.

It could be that 'golang' is not popular enough for statistical comparisons to be insightful. For a chuckle, look up 'golang' on Google Trends and then add the second term 'perl'.

Sure, and you can draw the conclusion that Perl is declining and Go is rising.


It suggests that despite its recent growth, Go still has such a low search volume that it barely registers against a language that has practically disappeared from the radar. Combine that with Google's small presence in China and whatever unknown formula they use to normalize popularity in each country, and it could actually be that Go is not significantly more popular in China than in other places. Apparently HHVM is a huge hit in Belgium. http://www.google.com/trends/explore#q=hhvm&cmpt=q&tz=

Or you can conclude that the topics trends beta has a ton of work left to do on it. For instance there's no way golang has more interest than Objective C and Swift put together, but that's what trends beta claims.

How can you be so sure about it. First of all, Go is not generating more interest than Obj-C[1]. Secondly, most searches regarding language still happens inside the GFW(like on Baidu). So ya, trend search certainly doesn't tell you the whole story about total usage, yet it still tells you part of the story, which is the "trend" IMO.

1. http://www.google.com/trends/explore#q=%2Fm%2F09gbxjr%2C%20%...

I recall reading a similar post about Node.js a few years ago. For what it's worth, it might just be that China's programming community is growing (and interacting more with the West). The Alexa map is actually not too dissimilar from a population by country map.

If I had to hypothesise about golang in particular, I'd say it might have something with Docker (Baidu is using Docker for its PaaS for example) although it's difficult to say if the relationship is the other way around.

Perhaps the large number of new graduates each year has something to do with this. Also, internet is the industry that is on fire these years, which attracts more and more young people. New workforce is always looking to a better position to enter the market. That means they may focus on new techs on upward trend more to try to have some kind of extra bonus to get into the job market.


Translated: "The article doesn't explain why, only that it is."

So laowushi, why do you think it is?


Translation: This is probably because 1) Google has a special place in the hearts of Chinese developers. 2) Golang came from the same roots as C,is simple, has OOP features etc. Most Chinese computer science students' first language is C. 3) Golang has a large and specialized library.

> Google has a special place in the hearts of Chinese developers

Why is this? Is it because of Android or something else?

Many, but not android. Android sucks. Google helped people in china to search content what the Chinese gov doesn't want them to know; and google's attitude of content censorship.


Translation: Thanks

Why are you speaking Chinese on an English newsboard?

It's not very polite to respond in a different language as the question, especially when it cannot be presumed everyone will understand you.

>Why are you speaking Chinese on an English newsboard? It's not very polite to respond in a different language as the question, especially when it cannot be presumed everyone will understand you.

But it fits in with the current discussion, and I think is in the spirit or this particular thread.

Being able to read English is a different skill from being able to write it. A lot of the Chinese students I know can understand it mostly fine but have trouble writing coherently for an English reader.

I think in times of google translate that's not true anymore. Anyway it might be the only way for him to respond. If you feel uncomfortable communicating in Chinese I can completely understand that (I spend a year in China without many previous Chinese skills) but it's not a huge problem if it just happens here and there. Let him communicate to us this way. There are people here who can speak Chinese to him back. And he seems to be able to read English, so you don't have to use Chinese. :)

In the times of Google Translate, it would be easier for him to translate what he's saying and post it here rather than the thousands of English speakers here having to translate it.

Anyone is free to respond any way they want, but the point remains it is an English-language forum and complaining that someone is not posting in English is a perfectly valid criticism.

No, Google Translate usually gives out shitty translations, meaning that the information will be actually lost.

If they post in their native language, maybe someone goes along and translates it properly, meaning the information can be fully restored.

Et donc moi aussie je peux utiliser n'importe quelle langue? /s

Si on vas tous utiliser Google Translate, on va commencer à parler comme des logiciels. Moi en faite je préfère parler avec des humains. On fait tous l'effort.

I really, really have a hard time getting your point. Do you feel you talk to me via a machine, i.e. Translate? But I used it to understand what you are saying, because I don't speak much French. But it's possible for me to respond to you, because thanks to Translate I do in fact understand some of what you want to say. Because of that tool, you and I can talk even though you used a language that I don't understand very well. Did you want to proof my point? Because that's what happened, I think.

At least get the grammar right, please!

I think he might have just Google translated that and thereby ignored the point that I wanted the reader to translate, not the writer.

Wow, I saw India after US and China. Seriously, India? Never expected that they would be so interested in Go Lang.

golang.org is blocked by GFW in china, people must visit it through proxy server outside china, so I think the visit statistic is not accurate.

I really wish the main findings had been summarised in one paragraph at the top of the article, instead of towards the end. All things considered it could have been written a lot shorter and a lot clearer.

Perhaps, because China doesn't have "enterprise" sweatshop industry and "Java mass hysteria" and Golang is, well, actually good enough?

One possible explanation would be that China has such a gigantic population. Basically everything that is a niche there is a big community by our standards.

Because chinese tends to use their stuff rather than what world shares!

people in china cannot visit google related site, include golang.org.LOL

And still they form one of the biggest user groups. Quite interesting, right? If you have some Chinese programming friends it's probably not hard to get an interpreter binary and the documentation in Chinese for your system of choice. It's a good example that the public image and what actually happens is not even expected to be the same in China.

Because they do not understand erlang

Actually,erlang is being used in taobao.


Translation: laugh

Actual translation: haha ;)

alibaba has a group of people user erlang.

I have a theory that it might be because of the Chinese game "go" that it started to become popular in China.

"Go" is actually the Japanese name for the game. In Chinese, it's called "weiqi".

Oh right... Well you just killed my theory.

If you just search for "go" it might still be true what you say. At least Google is able to understand synonyms. So searching "go" and something in Chinese might yield results with "weiqi" in it.

What really kills your theory is that "golang" is certainly not easy to confuse with the board game.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact