C++ has knocked machine-learning favorite Python out of the top 3 in the TIOBE Index of popular programming languages.

It marks a reversal of fortune for C++, which, after years of occupying third place in the index, was pushed down to fourth place by Python in September last year. First and second place in the list remain unchanged, with Java in pole position and C at number two.

The TIOBE Index attempts to estimate the popularity of languages worldwide based on results from major search engines. The index is sometimes criticized for being a rather blunt measure, likely to be influenced by a range of factors beyond a language’s popularity, but its rankings are broadly in line with others, with a similar mix of languages albeit arranged in a different order.

In an analysis alongside the latest figures, TIOBE attributes the comeback of C++ to a surge in its popularity, rather than a fall in the use of Python.

“This is certainly not because Python is in decline: Python is scoring all-time highs almost every month. It is just that C++ is also getting more and more popular,” it writes.

SEE: 10 ways to prevent developer burnout (free PDF) (TechRepublic)

The report credits this growing interest in C++ to C++11, the version of the language released in 2011 that TIOBE said made C++ “much simpler, safer and more expressive”.

That leap forward in the language is only paying off years later, according to TIOBE, due to support for newer versions of C++ being introduced by major compilers, the tools that generate machine instructions from code.

“Now that the C++11, C++14 and C++17 standards are supported by the most important C++ compilers, i.e. GCC, Clang and Visual Studio, the popularity of C++ is reviving.”

Features such as automatic type deduction, closures and move semantics in modern versions of C++ are often credited with making the language far more pleasurable to work with.

That said, the TIOBE analysis says use of the venerable programming language is markedly different to a generation ago.

“C++ is still far away from its popularity in the beginning of this century when it had a market share of more than 15%,” it states.

Today C++ is a favorite for games and complex business applications, largely due to its ability to run extremely efficiently and precise control over memory use.

However, the language gives developers a lot of leeway to inadvertently introduce bugs due to memory mismanagement, and in recent years Rust has been gaining in popularity as an alternative to C++. Rust is designed to offer the fast performance of C and C++, but with more safeguards against mishandling memory.

If you’re a developer using C++ then check out the major new C++-related features in Microsoft’s Visual Studio 2019 IDE, or if you want to learn Rust, TechRepublic has rounded up the best free resources online.

Elsewhere in the TIOBE top 10, the only significant change is Assembly language climbing four places to tenth place over the past year. During the same period the rest of the top 10 was largely static, with JavaScript climbing one place and PHP dropping two spots, as you can see below.

The TIOBE Index top 10 for April 2019

Apr 2019 Apr 2018 Programming Language Ratings Change
1 1 Java 15.035% -0.74%
2 2 C 14.076% +0.49%
3 3 C++ 8.838% +1.62%
4 4 Python 8.166% +2.36%
5 6 Visual Basic .NET 5.795% +0.85%
6 5 C# 3.515% -1.75%
7 8 JavaScript 2.507% -0.99%
8 9 SQL 2.272% -0.38%
9 7 PHP 2.239% -1.98%
10 14 Assembly language 1.710% +0.05%