Hacker News new | ask | show | jobs
by Conscat 1046 days ago
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.

1 comments

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.