All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Why writing correct C and C++ code is nearly impossible due to undefined behavior

By

lycopodiopsida

12d ago· 11 min readenOpinion

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 pulled
Give 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.
Snippet from the RSS feed
If he had been a programmer, Cardinal Richelieu would have said “Give me six lines written by the hand of the most expert C programmer in the world, and I wi...

You might also wanna read