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

Midwest Motion Products is a leading provider of robust and reliable Motion Control Products.

Midwest Motion Products is a leading provider of robust and reliable Motion Control Products.

MMP specializes in supplying high-quality Brushed & Brushless DC Motors & Gearmotors for Robotics and Automation Equipment with a wide range of motor windings and gear ratios. With an impressive track record of more than 8,000 released DC Gearmotors designs and over 2,000,000 individual part numbers, we are renowned for our ability to handle large-scale orders. Due to our huge on-hand inventory, we are also well known for lightning-fast delivery of our standard products. We take pride in our dedicated customer service and our team of knowledgeable sales and engineering experts who are ready to assist you with custom design solutions tailored to your specific application. Additionally, we also offer a wide range of complimentary products, such as DC Motor Controls, DC Linear Actuators, AC-DC power Supplies, and DC Servo Amplifiers and others.