Developers apparently did not listen to a recent White House advisory to move away from C++ and C over memory safety concerns, as C++ has climbed to second place in the Tiobe index of programming language popularity, trailing only Python. The C language dropped to third place.
C++ is the number two language in the Tiobe Programming Community Index for June, while C’s third place ranking is its lowest position ever in the index. C++ was third last month while C was in second place.
“The main strengths of C++ are its performance and scalability,” said Paul Jansen, CEO of software quality services company Tiobe Software, in a blog post about this month’s index. “Its downside is its many ways to get things done, i.e. its rich idiom of features, which is caused by its long history and aim for backward compatibility.” Elaborating on the downside, Jansen said C++ makes code much harder to understand and maintain if everybody does something else to accomplish the same thing. “Through the years many different idioms have been introduced without deprecating it,” he said. “There are still some features in C++ that nobody should use but can be used.”
C++’s rise to second place defies a White House Office of the National Cyber Director (ONCD) report in February that advised developers to stop using C and C++ because of what the report said was a lack of memory safety. The report was written to reduce the risk of cyberattacks. The report cited the Rust language as an example of a programming language the ONCD considered safe. Jansen panned the White House bulletin.
“The US White House advice was not well-thought-through in my opinion,” Jansen said. “How can you recommend Rust while there are no tools and developers yet? Moreover, Rust is a [relatively] complex language to learn so definitely not something you want to leave to ‘government developers.’ C++ can be run in a very safe way, but of course you need to know how.”
C++ is heavily used in embedded systems, game development, and financial trading software, to name just a few domains, Jansen said. The White House warning about C and C++ prompted a sharp response from C++ designer Bjarne Stroustrup, who emphasized the efforts of the C++ standards committee to make C++ safer.
Other highlights of the Tiobe index for June include the Go language snagging seventh place for the first time, Rust climbing to 17th place, also an all time high, and Fortran holding on to its top 10 position.
The Tiobe index ranks language popularity based on the number of skilled engineers worldwide, courses, and third-party vendors associated with each language, which are assessed using search engines including Google and Bing and other websites such as Amazon and Wikipedia.
The Tiobe index top 10 programming languages for June:
- Python, with a rating of 15.39%
- C++, 10.03%
- C, 9.23%
- Java, 8.4%
- C#, 6.65%
- JavaScript, 3.32%
- Go, 93%
- SQL, 1.75%
- Visual Basic, 1.66%
- Fortran, 1.53%
The rival Pypl Popularity of Programming Language index assesses language popularity based on how often languages are searched in Google. The Pypl top 10 languages for June:
- Python, with a share of 29.06%
- Java, 15.97%
- JavaScript, 8.7%
- C#, 6.73%
- C/C++, 6.4%
- R, 4.75%
- PHP, 4.57%
- TypeScript, 3.0%
- Swift, 2.76%
- Rust, 2.5%