Why writing correct C and C++ code is nearly impossible due to undefined behavior
By
lycopodiopsida
Front-window bakery material. Catches the eye, delivers the goods.
Summary
The article argues that writing completely correct C or C++ code is nearly impossible due to the prevalence of undefined behavior in the languages. The author, a veteran programmer with 30 years of experience, contends that these languages are products of their original environments (1972 for C, 1985 for C++) and are no longer suitable for modern development in 2026. The piece reflects on the inherent unsafety of these languages despite their continued widespread use.
Key quotes
· 3 pulledGive me six lines written by the hand of the most expert C programmer in the world, and I will find enough in them to trigger undefined behavior
Nobody can write correct C, or C++. And I say that as someone who's written C and C++ on an almost daily basis for about 30 years.
C++ has served us well, but it's 2026, and the environment of 1985 (C++) or 1972 (C) is not the environment of today.
You might also wanna read
NVIDIA Announces "Hack for Impact" London Event for Autonomous AI Agent Development
NVIDIA is hosting a "Hack for Impact" event in London, challenging participants to build autonomous agentic applications using open-source m
Four practical steps to control Azure Foundry token costs for agentic AI workloads
This article provides practical guidance on controlling token costs in Microsoft Azure Foundry, particularly for agentic AI workloads where
MerLean-Prover: A Recursive Agent Harness for Lean 4 Theorem Proving Outperforms Baselines
MerLean-Prover is an end-to-end Lean4 theorem prover that replaces 'sorry' declarations with kernel-checkable proofs using three agent types
Why small pull request policies can backfire on software quality
The article critiques a common software engineering policy that limits pull requests (PRs) to small sizes (e.g., 500 lines, few files). Whil
apenwarr.ca·6h agoHow Anthropic contains Claude's expanding access across its products
Anthropic describes how it has evolved its approach to granting Claude, its AI assistant, increasingly broad access to internal systems over
Testing Cursor's Jira integration: How ticket quality affects AI agent performance
Cursor launched a Jira integration that lets developers assign tickets directly to an AI agent, eliminating context switching. The author te
bit.ly·8h ago