Hacker News new | ask | show | jobs
by deterministic 1046 days ago
C++ is one of the most successful programming languages in history. It makes all new languages look like a drop in the ocean comparatively.

Millions of professional C++ developers work on large scale mission critical C++ code that control everything from airlines to Fortune 500 companies to cars to nuclear reactors to military hardware. And new C++ projects are started every single day.

Most developers have zero clue on what it takes for a programming language to be successful in the real world. And they have zero clue on how much $ and time it would take to rewrite the billions of lines of C++ code out there that runs the world.

1 comments

Imo, rewriting the code isn't the only prohibitively difficult problem. Replacing the very advanced development tools C++ has seems almost impossible, and so far no competitor to C++ has come very close, and it's a moving target. You can debug template instantiations over the GDB remote protocol, you can print out an AST and make queries on it (much richer than Tree Sitter), you can generate a perfect callgraph (understands templates, overloads, and macros) with no effort, you can get suggestions for source code optimizations at the IR bytecode level, every hex editor or whatever can demangle C++ symbols, you can print out the ABI of any polymorphic class or use a bin introspection tool to do the same in reverse, you can organize template compilation errors into one of several easily navigable GUIs, you can JIT C++ code in a REPL or a debugger and place breakpoints on templates or overload sets or exceptions, you can extend linters and compilers with plugins, and C++ has some of the most advanced static analyzers of any language (not just systems level ones).

The closest overall in tooling IMO is Rust, but it's currently missing a lot of the above, and very many C++ abstractions cannot be elegantly expressed in Rust due to limitations in generics, const functions, the orphan rule, and a lack of C++-like functor structs.

Yep agree. Most HN developers work on comparatively simple JavaScript CRUD business applications and have zero clue on what it takes to write the large scale high-performance software the world relies on to function.