C++ in 2026: less magic, more engineering — what I’d still write in it

Dana Okon

Dana Okon

September 18, 2026

C++ in 2026: less magic, more engineering — what I’d still write in it

I do not miss the era when C++ was a personality. Template metaprogramming as a sport. Boost as a second standard library you argued about in interviews. A culture that treated undefined behavior like a secret handshake. I still write C++. I write less of it, and I write it like an engineer instead of a magician.

The language did not die. The jobs that needed a magician mostly died, or they moved into a sanitizer build and a boring subset. Here is what I still open a .cpp file for in 2026, and the cleverness I will no longer sign.

What changed that made me stay

C++11 felt like a new language. C++17 and 20 made the defaults less humiliating. C++23 is where I actually live when the compiler farm allows it: std::expected where we used to invent Result types, ranges when they make a loop shorter rather than cuter, modules in the shops that have survived the toolchain pain. I am not a committee fan. I am a person who is tired of writing the same move constructor wrong.

The bigger change is the surrounding engineering. AddressSanitizer, UBSan, clang-tidy, a CI job that runs the tests under them. CMake is still CMake, but vcpkg and Conan made “how do we depend on this” a solvable argument instead of a weekend. I will take a dull package graph over a vendor tree I copied in 2014.

Rust ate the moral high ground, and that helped C++. The people who wanted a lecture about memory went to Rust. The people who needed a compiler that talks to a twenty-year-old SDK, a game engine, a broker’s native library, or a CUDA-adjacent pipeline stayed. The remaining C++ I see is more honest: we are here because of the ABI, the ecosystem, or the last millisecond, not because we enjoy lifetime puzzles.

Jobs I still pick it for

Engines and simulation. Unreal, custom renderers, physics, anything that already is a million lines of C++ and a plugin SDK that will not grow a Rust FFI this year. I have written gameplay-adjacent systems in that world. The job is not to rewrite the engine. The job is to not introduce a frame hitch and a leak. I use the subset the studio already lints, I do not invent a policy.

Native libraries that other languages call. A codec. A parser you will run in a hot path. A quant library a Java service must not reimplement. I would rather write a small, documented C API with a C++ implementation than pretend JNI is a design. The boundary is the product. I keep the magic on the inside and the ABI boring.

Embedded-adjacent and systems that talk to hardware. Drivers, robotics stacks, a lot of ROS 2 still, industrial controllers that will outlive the startup that wants to rewrite them in Go. C is sometimes the honest choice. C++ is the choice when the team will otherwise invent classes in C with macros. I pick the one they can test.

The last ten percent of a hot path. A Go or Java service that spends its life in JSON is not a C++ candidate. A tight loop you have profiled, that already dominates the bill, that you can isolate behind a clean interface — that is a candidate. I profile first. I do not start a C++ service because someone said “performance.”

A workstation with a dual monitor setup showing a native debugger and a flame graph

The magic I refuse

I will not accept a pull request whose point is a clever template. If the template removes duplication that a concept or a short macro (I said it) cannot, fine. If the template exists to compute a type the author is proud of, I ask for the version a new hire can debug at 1am. Pride is not a requirement.

I will not disable sanitizers “because they are slow.” They are slower than a silent corruption that ships. I will not ship a Release build that we have never run the tests against. I will not treat warnings as noise. -Werror on the files we own, exceptions documented for the third-party swamp.

I will not write custom allocators until the profiler names allocation. I have watched people write arena allocators for a service that was waiting on a mutex. The arena was beautiful. The mutex was the job.

I will not use exceptions as a hidden control flow across an ABI. Pick a policy: exceptions inside the library, noexcept at the edge, or error codes at the edge. Write it down. The hybrid I inherit every two years is how you crash in a destructor during an unwind you did not know you were in.

I will not “modernize” a working module by sprinkling auto and ranges until the blame is unreadable. Modernize the build, the sanitizers, the tests. Leave the loop that everyone understands unless you are there to change its behavior.

When I pick something else

I pick Rust when the component is new, the team can hire for it, and the value is “impossible states and no silent UB” more than “talk to this SDK.” I have been happier in Rust for parsers and sync engines. I have been less happy when the crate graph became the product and the compile was the stand-up topic.

I pick Go when the binary should be a network appliance and the team is not a systems shop. I pick the JVM when the domain is thick and the on-call already speaks it. I pick Python for the glue and the notebook, and I do not pretend a pybind11 wrapper makes the whole program C++.

I pick C when the platform is C and C++ would be a social fight with the firmware people. Winning that fight is not engineering. It is a hobby.

Printed C++ coding guidelines on a desk next to a hardware evaluation board

How I would start a C++ component Monday

A small library, not a process, unless the process is the point. CMake, a sanitizer preset, clang-format, a unit test binary that runs in CI on every commit. A C API if anything outside C++ will call it. No singletons. No global constructors that do I/O. A README that says what happens on allocation failure.

I would set a language dialect and a banned list that is short: no new outside a documented owner, no C-style casts, no using namespace in headers. I would not start with a 40-page coding standard. I have written those. They become a place to hide taste.

I would measure before I optimize, and I would keep a flame graph in the PR when the point of the change is speed. If there is no graph, it is not a performance PR. It is a rewrite with a story.

A week I still remember

We had a native pricing kernel called from a Java service. Someone “cleaned up” a hot function with a clever view into a temporary std::string. Tests passed. Production did not, once the allocator reused the page. The sanitizer build would have caught it. The sanitizer build was “too slow for the default pipeline.” We turned it on after the incident. That is the whole religion I have left: the boring pipeline is the language feature.

The 2026-specific noise

AI assistants are decent at C++ boilerplate and dangerous at lifetime. I treat generated C++ like generated C: it compiles, therefore it is suspicious. I have had an assistant happily produce a dangling view into a temporary. The compiler did not save me. The sanitizer did, once I ran it. If your team uses Copilot on C++, the sanitizer job is not optional. It is the rest of the type system.

Safety profiles and profiles-as-a-story from the committee are interesting. I will not wait for them to ship a product. I will use the subset and the tools I have. I will not tell a regulator we are safe because a slide said the language is becoming safer. The regulator wants the test and the sanitizer log.

Carbon and the other successor languages are experiments I watch. I will not start a production component in a successor until the shop that owns my linker agrees. C++’s curse and gift is the existing world. I live in the existing world on purpose.

What I tell people who think they should learn it to be serious

Do not learn C++ to be serious. Learn it if you have a job that already is C++, or a profile that points at a native library, or a hardware story. Serious is owning a system. Plenty of serious systems are Go and Postgres.

If you do learn it, learn the engineering: build, sanitizers, ABI, how to read a crash in a debugger, how to not lie about thread safety. Skip the magic contest. The contest is over. The people who won it are on other languages or they are tired.

I still write C++ when the job is engines, native edges, hardware-shaped systems, or a hot path I can isolate. I write it with less magic and more CI. That is not a lesser C++. That is the only C++ I still trust after the clever years.

More articles for you