RedMonk publishes a regular state of the nation examining programming language popularity as a function of activity in Stack Overflow and GitHub. The rankings have become more useful as we have established a reasonable time frame to examine trends, and as such my colleague Rachel Stephens recently published the above chart. When I first looked at it the data point that immediately struck me was the rise of TypeScript. At a glance it looks like TypeScript is about to overtake Swift in terms of popularity. But then, the chart is actually about the position of languages relative to one another, rather than reflecting any absolute metrics. Swift remains the fastest growing programming language we’ve ever seen using our methodology–it exploded in mid 2016. But new technology adoption tends to look like an s-curve, and Swift may indeed have begun to saturate its niche.
Developers were hungry for an alternative to Objective-C, and Apple provided one, but Swift has not established itself in new niches, such as server-side development. When considering Rachel’s chart I thought we should probably examine some other metrics. Using the same methodology as our overall language rankings analysis, here is a chart of growth in pull requests across public GitHub repositories, with language determined by a repository’s base language.
Pull requests are an indirect measure of community activity and as such this chart is quite something. It’s also notable that the TypeScript growth looks like it’s a cumulative graph, when in fact that’s just growth in annual numbers.
GitHub Stars are an indicator of developer interest, and it is interesting to triangulate trends over time. The majority of the interest in Swift came immediately following Apple’s initial launch. Similarly, Kotlin saw a spike in interest when Google added it as a first-class supported language for Android. TypeScript on the other is less spiky and possibly more sustained in that it’s not correlated with major vendor launches.
So what is driving TypeScript growth? One high level answer is that more strongly typed languages – in which you need to define the type of information in a variable up front – are having a renaissance. Rust, for example, has gained a passionate following in the systems programming space – you can now get jobs writing Rust with folks including Cloudflare, Fastly and PingCAP. (And for the inevitable questions about why Rust is not included in the Top 20 Languages chart: it’s currently sitting at #23.)
Another notable space where TypeScript has found a home for itself is in configuration as code tools. Both Atomist and Pulumi make extensive use of the language. Atomist founder Rod Johnson knows a bit about abstraction and productivity, being the creator of the Spring Framework, and he decided to standardise on TypeScript at Atomist for building automation tools, what he calls a Software Delivery Machine. In a New Stack interview he argues:
“I think TypeScript is probably the most important language right now, because if you think about languages, you could think about a language that’s ideal and wonderful and makes something like 50 times better, but if it isn’t easy to adopt there’s no point. You can think about a language that’s incredibly easy to adopt and makes everything twice as good. The former is Haskell, the latter is TypeScript.
The idea that TypeScript could find converts from the legions of Java developers out there is interesting. William Saar, who has been writing Java since 1996 asks Is TypeScript the only language your company needs? One point I really like in his analysis is that frameworks such as TypeORM and NestJS were written with types in mind and provide constructs such as dependency-injection that are familiar to developers with experience from Java frameworks like Spring and Hibernate. Frameworks of course drive language adoption.
Some thoughts on Microsoft given it’s the company’s Build 2019 conference this week.
While it’s currently fashionable to talk about opportunities that Microsoft has missed, there are some things it’s never lost sight of – namely the important of developer productivity. Visual Studio Code has won converts in multiple languages – even more impressive because code editors are one of the things software developers are least pragmatic about. Code offers excellent, “just works”, support for TypeScript. Developers love Code, they love TypeScript, and they love GitHub. These are all excellent platforms in their own right. Together that’s an amazing, rich set of services to build momentum on.
Disclosure: Microsoft is a client. Atomist is also a client.