by physicsguy · 4y ago · 0 comments
I worked in C/C++ for a long time, though it’s been a while now. I just went to look at whether Rust had any bindings for MPI. It does - rsmpi. But they’re not fully implemented, and only support a restricted subset of MPI implementations which are pretty much the latest versions. Some others might work, but it is not explicitly tested against them. Without that, there’s a whole class of distributed applications that you’d be ill advised to write in Rust using that library, because it’s such a fundamentally core library for distributed applications, which needs to be compiled differently and with specific versions to handle the specialist interconnects on HPC systems. If you only support the latest versions, your code is not very portable to other machines.
Most of us don't have the funding, skills, time, priority to rewrite all of our old web forms apps even if we wanted to. Who is going to pay to rewrite the app that only earns us $10K a year?
Even if we did decide that Rust is great, do we immediately expect our C++ senior devs to produce the same quality code in a language they have only just learned? Are we going to recruit some confident youngsters who possibly know Rust but haven't been burned enough times to be pragmatic when implementing it in the wild. Do we want to rely on a new language that ticks lots of boxes but also lacks the understanding/support and battle-testedness of C++?
He's not suggesting rewriting anything. He explicitly said "it's time to halt starting any new projects in C/C++" (emphasis mine)
C/C++ isn't going away, old C/C++ things can remain as old C/C++ things.
The amount of global manhours MS is throwing down the drain by constantly ending support for their versions must be absolutely staggering. Updates are often far from trivial, and they expect everyone to keep up with their fast upgrades and tiny support windows? Long term support is only 3 years, are you kidding me?
No, they are actually trivial starting from 3.1/5/6 exactly because of the work they have put in.
And sure, upgrading from .Net 5 to 6 was trivial, but do you really anticipate it will now finally remain stable for eternity? Give it two or three minor versions and they'll have come up with something else to break 90% of your dependencies.
So offering these shops to consider Rust or any other "it's better" language is similar to Enterprise Java push back in time, which simply turned local weed gardens into weed prairies with even wilder variety.
Meanwhile considering safe practices and features of whatever modern C++ is a normal and indeed organic process for such organizations, be it for new or supporting the existing projects.
As for starting an "independent" new project, well, that's a whole new story. I guess the choice would still rely on the need and availability of external components for it. Ah, least we forget about the costs!
Until rust catches up with some meaningful feature set that Qt provides starting a GUI project in rust is probably going to be painful.
https://github.com/tauri-apps/tauri uses OS provided WebView
https://github.com/sciter-sdk/rust-sciter uses Sciter
But Qt provides that…
tauri has exactly 1 release, that was done 4 days ago.
sciter has done no release in over a year, and has 6 releases total.
It would be completely insane to pick either of those instead of Qt.
If someone is a Qt and C++ expert, then maybe, but it still seems like an uphill battle compared to web stuff, which to me seems better supported on all platforms.
But if you do have the freedom to choose, then I don't see why anyone would really pick C++ over Rust at this point.