The Rise of Go in Github

Recently I wrote my first article here on LinkedIn just to share a small snippet of information related to the Go language and how the choice of compiler can make a significant difference in performance of the resulting executables.

In the comments section, my friend Engineer Yaser Marey (https://www.dhirubhai.net/in/yassermaree) wondered out loud about the ecosystem of Go vs. Python. This was driven by my observation that Go is a reasonable choice to investigate for building applications since its overall performance, portability, and ease-of-use seem to have hit a sweet spot that few other programming languages have done. The natural question that Engineer Marey brought up is whether the large ecosystem of Python removes some of Go's appeal.

The reality is that Python is almost 3 times older than Go (around 30 years to 10). It is only natural to expect Python to be much more entrenched and with a broader and deeper set of libraries to build upon. If we count pure lines of code, there is no doubt which language has more tools available ... *today*.

Out of curiosity, however, I wondered what about tomorrow? Only Allaah knows for sure, but are there any interesting trends we can observe today that may predict the future?

It turns out that there is an interesting data set that we can indeed look at: the relative number of pull requests on Github over time by programming language. Github is one of the largest code repositories on Earth, and they publish a yearly summary of the repositories they manage - see The State of the Octoverse at https://octoverse.github.com/#top-languages. I've set the anchor of that link to take you to the top programming languages by volume of code. Go is nowhere on that list of 10 languages. Python is recently enthroned at second place. Again, that is today. But what about tomorrow?

What the Octoverse does not show clearly is the change in activity levels for the different languages. One measure of activity is pull requests as already mentioned. In 2019, Github saw 87 million pull requests. It is a reasonable metric, and though not all pull requests are eventually accepted and merged, it is fairly reasonable to assume that the pull request acceptance rate does not vary much from language to language, so we can ignore that for the purposes of comparisons across languages.

Github does actually provide an API to track this data, and there is a nice site at https://madnight.github.io/githut that pulls that data and summarizes it. Here is one screen shot (I've highlighted the fact that it is showing pull requests):

No alt text provided for this image

The percentages that are shown indicate the relative number of pull requests per language for that quarter of the year (e.g. the 2nd quarter of 2020 as shown above). We can see from the screenshot that 18.789% of all pull requests for the 2nd quarter of 2020 were against Javascript based projects (18.789% of roughly 87M/4 = 18.789% of 22M pull requests = roughly 4.13 million pull requests).

The site above does not show historical trends however. For that, I collected the data since Q1 of 2015 till today (Q2 of 2020 since Q3 is not done at the time of writing). The file can be found at https://docs.google.com/spreadsheets/d/1YCj_sKMFQ27MF84Y5GRIC97ecK86ZwMQlUfdaGaO2VM/edit#gid=0.

Below is the graph of relative pull requests on Github since 2015. The Go programming language is shown with a slightly thicker red line.

No alt text provided for this image

Note that not all languages are represented in the graph above. However, in all cases, at least 75% of all languages are covered: in Q1 2015, the languages above account for 82% and by Q2 2020, they account for 77%. Why the drop? Because of the decade-old phenomenon for better or for worse of programming language fragmentation. One language that is rising fast and not shown above is Typescript (it is eating away at Javascript primarily).

Over the five year and 2 quarters period shown above, here are the final differences between the first quarter (Q1 2015) and the last quarter (Q2 2020) relative percentages:

  • C: Loss of 0.567%
  • C++: Gain of 2.049%
  • Go: Gain of 5.667%
  • Java: Gain of 0.103%
  • Javascript Loss of 2.002%
  • PHP: Loss of 5.025%
  • Python: Gain of 0.289%
  • Ruby: Loss of 5.413%

The simple takeaway is that Go pull requests (and by reasonable inference its overall usage) are skyrocketing compared to the other major languages. At the start of 2015, 3 out of every 100 pull requests were in Go, and the leader was Javascript at 21 and Python at 16. By the middle of 2020, Go had increased to 9 out of every 100, Javascript was at 19 and Python at 16. If this trend continues, the landscape of software applications five years from now might be significantly different than today.

One more note: the impending release of Go 2.0 should, in theory, push even more applications to Go since, again in theory, that release should correct at least two major deficiencies within the language: lack of generics and awkward error handling. Many developers coming from Java and C# find those two deficiencies hard to accept.

Predicting the future is always hazardous, and so I remind myself: Allaah knows best where Go will ... go!

Fahad Alenazi, Ph.D

EVP, Head of CACE @ SNB | Data Strategy and Advance Analytics

4 年

“Allaah knows best where Go will ... go!” ????

要查看或添加评论,请登录

Ahmed Abd-el-Shafy Abd-Allah, PhD的更多文章

  • A Look at Go's Performance vis-a-vis C

    A Look at Go's Performance vis-a-vis C

    In the process of learning Docker and Kubernetes, I have learned that both of those disruptive technologies (and that's…

    6 条评论

其他会员也浏览了