Our Vision for the Future of C++

People have been arguing back and forth that C++ is dead, C++ is back and that C++ never went. As usual, the truth is somewhere in between. First of all, even if C++ is “dead” it isn’t going anywhere fast. We estimate that there are around 8 million programmers who know at least some C++, and 1.2 million programmers who are actively using it. And C++ is over 30 years old; that’s a lot of legacy code.

The June 2016 issue of the TIOBE index gives us an interesting insight:

For the first time in the history of the TIOBE index a language needs to have a rating of more than 1.0% to be part of the top 20. What does this mean? This indicates that the number of real market leaders is going down. The set of languages to chose from is getting bigger and more and more less well-known programming languages are being adopted.

Programmers are choosing from a wider range of languages, tailoring their choice to the task at hand. In this new world, a programming language survives by dominating a niche. JavaScript runs (more or less) in every browser; Clojure is a Lisp with great library support; and Erlang make concurrency much, much easier. Where does C++ fit in?

C++ is unique in combining:

  • Full control of memory
  • High-level abstractions
  • Zero run-time overhead
  • Thousands of proven libraries
  • Legacy support

At LoopPerfect, we are working on adding another advantage: rapid development times using just-in-time compilation.

Currently, developing C++ code is a painful process. Every time the programmer wants to see the result of a code change, they must close, recompile and restart their application. Compilation can take hours and often the behaviour being tested is deep inside the application flow. This lengthens iteration times and slows the developer down.

In the web world, this problem is solved using hot module reloading. When the developer changes a source-file, the new logic is injected into the existing application state. The change is seen instantly, reducing development time and leading to quicker delivery of a better product.

We provide the same functionality for C++. Using a standard compiler, compilation is a batch-process: you send the source-code into the compiler and get an executable back. With our compiler, the process is interactive. By keeping the parsed source-files in memory alongside the compiled code, we can add, remove and modify logic at run-time.

Hot Module Reloading in C++

This dramatically lowers development time, but since the source-code remains standard-compliant it can still be used with a production compiler. This is the best of both worlds: rapid development for the programmer and maximum performance in the final executable.

We’re excited about where the project is going and would love to get your feedback. You can try a beta version on our website, or get in touch at hello@loopperfect.com.