3 ms·
I like the practicality of this. I know everyone (particularly here) is excited about new languages, and some of them are great. I'm learning some myself. But
by sseagull 3y ago
I like the practicality of this. I know everyone (particularly here) is excited about new languages, and some of them are great. I'm learning some myself.
But there's billions (?) of lines of existing C++. For those projects, there are two options: (1) improve compiler static analysis, possibly incrementally update it with something like 'profiles'. (2) Do nothing.
There is no "rewrite it in another language" option. Those are your choices, and even (1) is a stretch.
So I do think we should be moving forward on both fronts - improve C++ so that existing code can be made safer, as well as push the envelope with newer safer languages.
- r0ze-at-hn 3y agoOption 3) Most businesses have a lifetime, most software has a lifetime, and one day they are run for the very last time. The same will happen for code written in C++, most of it will simply die. Some might live on in a GitHub repository, never to be compiled again. Option 4) The business core is turned into a library. Everything from the command line tools to UI all wrap this in other languages. Everything that is not the core is deleted. With the C++ committee after the last two decades I am firmly in the I'll believe [shiny feature] when I see it camp.
- pjmlp 3y agoCOBOL 2023 was just ratified, so C++ still quite a road ahead of itself even if we rewrite everything starting today.
- tobias12345 3y ago> There is no "rewrite it in another language" option. How about "Wrap your C++ code in FFI wrappers and use it from a safer language"? It is conceptually not much different to "rewrite all your C++ code to be profile compliant" -- which will involve wrapping existing "unsafe" C++ code you can not just port over to mark it up in such a way that tooling can reason about it better.