4 ms·
Rust couldn't solve all of these bugs, but it certainly would have drastically reduced the total amount. The code would also be drastically easier to write and
by ilovecaching 8y ago
Rust couldn't solve all of these bugs, but it certainly would have drastically reduced the total amount. The code would also be drastically easier to write and debug. C++17 is still a total mess to write, despite what Microsoft might tell you in their docs. Really doesn't make sense to me, outside of the sunk cost fallacy, why Microsoft isn't pivoting to Rust if they want to write C++.
- sumitgt 8y agoMicrosoft probably has tons of internal libraries that are modified and shared between many different teams spanning multiple orgs. I think a pivot like this is an incredibly complicated thing for a company like Microsoft to perform. It requires multiple years of planning from the ground up to port internal libraries and tooling, train engineers on Rust best practices. Not to mention the tricky business of going around and hiring Rust developers at the scale MS needs. :) I think, simply waking up one day and changing the language / frameworks / tools used by your company is a privilege only smaller companies and startups might enjoy.
- ilovecaching 8y agoI would imagine that we would at least hear about Microsoft doing some new projects in Rust, or at least using it in some capacity to understand the cost/benefits better. I'm sure the first step would be increasing C++ interop.
- sanxiyn 8y ago> I would imagine that we would at least hear about Microsoft doing some new projects in Rust We did.
- duneroadrunner 8y agoReplacing existing unsafe C++ elements with compatible memory safe substitutes[1] might be more expedient. The conversion can even be automated[2] for parts of the code that aren't performance critical. [1] shameless plug: https://github.com/duneroadrunner/SaferCPlusPlus https://github.com/duneroadrunner/SaferCPlusPlus [2] https://github.com/duneroadrunner/SaferCPlusPlus-AutoTranslation https://github.com/duneroadrunner/SaferCPlusPlus-AutoTransla...
- ilovecaching 8y agoI'm not a fan of these types of efforts. You could be putting energy into making Rust better. Memory management aside, C++ has become an incomprehensible mess filled with cruft. Rust does much more than provide safety, it provides better abstractions, a better type system, and actual tooling. Building tools for C++ to keep the ship afloat just means we have to deal with writing C++ longer.
- coldcat 8y agoyou could ask the same question for every os. And none choose Rust even the recent like fushia. BTW go ask Linus to switch to Rust I'm waiting for you there.
- ilovecaching 8y agoFuchsia is using Rust for some pieces. That's what I assume MS would do. MS is a company with tons of products, not just an OS, and certainly not a single monolith. You wouldn't rewrite everything in a day, you would slowly move things over time.
- sanxiyn 8y agoFuchsia implements TCP/IP stack in Go. It is an improvement over others.
- pjmlp 8y agoLinus is never going to switch to anything else other than C, UNIX is married to C. So it is always going to be something else, not UNIX related. Fuchsia uses Rust and Go in several areas. Microsoft is using Rust on VSCode, Azure and IoT Core.
- sanxiyn 8y agoMicrosoft is using Rust for greenfield projects: https://github.com/Azure/iotedge https://github.com/Azure/iotedge
- pjmlp 8y agoMicrosoft is a big C++ shop, we would all be running AOT compiled .NET code post Windows Longhorn if it wasn't for the political wars between DevDiv and WinDiv. Just notice that on current desktop and mobile OS SDKs, Windows is the only one where C++ still gets a place at the GUI table. Everywhere else it just got pushed down the stack. So while some divisions would like a world of purely .NET (AOT/JIT compiled), others would rather that it did not exist.
- gnuvince 8y ago> Rust couldn't solve all of these bugs, but it certainly would have drastically reduced the total amount. Well there's certainly a chronological argument that it couldn't have, but I agree with the sentiment. It saddens me that our industry is one in which people _do_ let perfect be the enemy of better.