Blog 2 min read

Orthodox C++ Fans: Are They a Minority or a Silent Majority?

Share this article
Orthodox C++ Fans: Are They a Minority or a Silent Majority?

Bloggers, influencers, and the C++ Standard Committee actively advocate for the use of Modern C++. Through articles, tutorials, and social media, bloggers and influencers highlight the benefits and innovative features of the latest C++ standards, aiming to educate and inspire the programming community. Their collective efforts are geared towards encouraging developers to adopt Modern C++, leveraging its advanced capabilities to write more efficient, maintainable, and robust code.

However, not all C++ developers agree with adopting Modern C++ for various reasons, leading to the emergence of the Orthodox C++ approach, which advocates for using a minimal subset of C++.

Orthodox C++, as defined by its fans

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so-called Modern C++. It is the exact opposite of what Modern C++ is supposed to be.

To summarize, Orthodox C++ fans are adopters of the C++ presented by Bjarne Stroustrup 40 years ago:

https://www.youtube.com/embed/69edOm889V4

Here are some project samples of the Orthodox C++ approach:

Preferred Orthodox C++ rules:

  • C-like C++ is a good starting point. If the code does not require more complexity, do not add unnecessary C++ complexity. In general, the code should be readable to anyone familiar with the C language.
  • Don't do this, the end of "design rationale" in Orthodox C++ should be immediately after "Quite simple, and it is usable. EOF".
  • Don't use exceptions.
  • Don't use RTTI.
  • Don't use C++ runtime wrapper for C runtime includes (<cstdio><cmath>, etc.), use C runtime instead (<stdio.h><math.h>, etc.)
  • Don't use streams (<iostream><stringstream>, etc.), use printf-style functions instead.
  • Don't use anything from STL that allocates memory.
  • Don't use metaprogramming excessively for academic masturbation. Use it in moderation, only where necessary, and where it reduces code complexity.

As we can see, proponents of Orthodox C++ advocate for using a minimal subset of C++, but online resources suggest that they are in the minority. Indeed, the majority supports the use of Modern C++. However, when it comes to the broader C++ developer community, the question remains: are most developers actively using modern C++ features, or do they primarily rely on basic C++ concepts?

We can't have a precise answer to this, but it is clear that many projects still adhere to the Orthodox C++ approach due to their legacy codebases. This often prevents developers from transitioning to Modern C++, resulting in a continued emphasis on basic C++ concepts.

Share this article