logoalt Hacker News

geokonyesterday at 8:28 AM2 repliesview on HN

"Correct" modern C++ eliminates whole classes of problems. You can of course still write C code, but no one would merge that in to their codebase

Theyre both complicated languages in their own way :)


Replies

lelanthranyesterday at 9:36 AM

> "Correct" modern C++ eliminates whole classes of problems. You can of course still write C code, but no one would merge that in to their codebase

That requires the programmer to practice discipline. If someone needs something better than C, there's alternatives to C++ that don't require "Programmer needs to be disciplined".

> Theyre both complicated languages in their own way :)

No. C++ is, without doubt, the most complicated language there is. Nothing else, not Java, C#, Rust, etc comes even close.

C, OTOH, is simple enough that implementing it is practical even for students. The number of footguns are a handful.

They are severe, but not numerous. C++ has both numerous and severe footguns.

pjmlpyesterday at 8:33 AM

Unfortunately plenty of folks do merge it into their codebases, including at companies that seat on WG 21, easily found on their Github projects.