John Carmack On Modern C++

Winter break homework from John Carmack. Gamasutra reprint article "In-depth: Functional programming in C++":

A large fraction of the flaws in software development are due to programmers not fully understanding all the possible states their code may execute in. In a multithreaded environment, the lack of understanding and the resulting problems are greatly amplified, almost to the point of panic if you are paying attention. Programming in a functional style makes the state presented to your code explicit, which makes it much easier to reason about, and, in a completely pure system, makes thread race conditions impossible... (full article)

Also "Lessons to learn from Oculus development team when using the “Modern C++” approach":

Modern C++ doesn’t imply necessarly the overuse of templates

Andrei Alexandrescu says about the Modern C++ design:

"Modern C++ Design defines and systematically uses generic components - highly flexible design artifacts that are mixable and matchable to obtain rich behaviors with a small, orthogonal body of code."

Modern C++ has a close relation with generic programming; probably it’s the reason that makes many developers neglect the modern C++ approach. They think that the code will be mostly implemented as templates, which makes the code difficult to read and maintain.

In the SDK, the templates represent only 20% of all types defined and most of them are related to the technical layer... (full article)

Comments (0)

This post does not have any comments. Be the first to leave a comment below.


Post A Comment

You must be logged in before you can post a comment. Login now.

Featured Product

BLE2 Series Brushless Motor & Driver

BLE2 Series Brushless Motor & Driver

The BLE2 Series replaces our popular BLE Series and continues our brushless motor advantages by featuring an all new compact, high-power and high-efficiency brushless DC motor combined with a Driver that can be digitally set and controlled via external DC voltage or by the front panel. The BLE2 Series can easily compete with larger 3-phase inverter driven motors in many more applications, with built-in simple holding torque function, saving space and increasing performance thanks to the advantages of a brushless motor design. The BLE2 Series has a maximum speed of 4000 r/min, achieving a speed ratio of 1:50 (80 to 4000 r/min). The new motor structure is small than previous models and enables high power and high efficiency while incorporating easy setting, installation and wiring. The new motor connector offers IP66 degree of protection and allows for easy and direct connection between motor and driver with two available orientation of cable outlet direction. Standardized use of stain