3 ms·
Just a correction: Im not implying that Rust have no virtues, it has a lot, and its a very strong candidate to write new projects into whenever you think you ne
by oscargrouch 5y ago
Just a correction: Im not implying that Rust have no virtues, it has a lot, and its a very strong candidate to write new projects into whenever you think you need C++.
I would and will consider Rust always, and it probably will make sense to use instead. If my former post implied that i dont like Rust, im correcting here, because i like it and i thinks its cool technology and that it have virtues C++ don't have.
I was saying that, specially now that the language is more mature theres a thriving community around it, it can go by virtue..
C++ is where it is now because of its "killer apps". OS's, Browser, Games, a great amount of complex software with millions of lines of code.
And they are not garbage that need to be replaced. Rust taking over by virtue will be by creating killer apps in it. Showing itself as a great replacement for projects that can also be coded in C++.
Security folks invested in Rust saying that all new code in Android will now be coded in Rust its not replacing by virtue as important things like domain knowledge and getting used to a tool is also very important, and it will probably go away. Security is just one thing that is important in a project, its not the only one. But of course if you let the security folks decide, other important aspects will not be taken into account (I tought it was a really bad move by the way, as other problems not linked to security will appear with time).
- tptacek 5y agoNobody with influence agrees with this assessment. Without taking the bait on this "C++ software is garbage" stuff: there's general acceptance that some significant chunk of memory-unsafe software, particularly the stuff most exposed to attack, or that runs on the systems we're most concerned with being attacked, needs to be replaced with memory-safe alternatives. It is simply not the case that Rust's only role is in "new killer apps". Replacing C++ code is part of the raison dêtre of Rust. You knew this was a pointless dead argument the moment Linus Torvalds began entertaining Rust kernel modules. The debate is over. That doesn't mean --- regardless of what any website says --- that all C++ software is "garbage", or that anyone is going to pry C++ out of your cold, dead hands. But it does make arguing about whether the maintainer of curl should accept funds to replace some of their code with Rust tedious and unproductive.
- pjmlp 5y agoThere is, yet WinUI selling point is that it is written in C++, just like macOS DriverKit and Metal. I am betting with you how Microsoft will tout the C++ trumpet on the Windows 11 Developer talks next week, despite their timid approach to Rust on some of their tools now.
- mwcampbell 5y ago> yet WinUI selling point is that it is written in C++ That is probably intended to be a contrast with C# or JavaScript, not Rust.
- pjmlp 5y agoSo the marketing message goes something like this, Microsoft Security Response Center puts out a guideline that states: 1 - Use .NET languages, Java, Go if you can afford a GC 2 - Adopt Rust otherwise 3 - If C++ must be used, take care and adopt C++ Core Guidelines WinUI team, "WinUI is powered by a highly optimized C++ core that delivers blistering performance, long battery life, and responsive interactivity that professional developers demand. Its lower system utilization allows it to run on a wider range of hardware, ensuring your sophisticated workloads run with ease." https://microsoft.github.io/microsoft-ui-xaml/ https://microsoft.github.io/microsoft-ui-xaml/ I should also note that .NET is migrating their C++ code into C#, as they improved the language to add the features available on Sing# and System C#. " In this release, we’ve continued, and even accelerated, the process of porting native implementations in the coreclr runtime from C/C++ to instead be normal C# managed code in System.Private.Corelib." https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/ https://devblogs.microsoft.com/dotnet/performance-improvemen... C++ force is too strong on WinDev, the very fact that Windows is the only mainstream OS that still doubles down on a C++ based GUI framework kind of proves it. I am really curious if Windows 11 will finally be more like Apple and Google platforms, or keep going down this path of making certain APIs only available in C++, while forcing .NET devs to manually wrap them.
- oscargrouch 5y agoI have no problem with Rust strengths or goals, but it needs to start focusing more on showing those strengths and less on envying other programming languages achievements trying to deceive mostly politically näive tech people by implementing Rust trojan horses, making gradual takeovers of popular projects so Rust have a place in the pantheon of the technological status-quo, where it can say how it bravely replaced the dangerous languages out there and the world is a better place for it. This org is effectivelly a "rewrite in Rust" but now in its institutional form, so a line between random comments on the internet and the materialization of this goal have being crossed. If they were really serious about security and memory safety, other memory safe languages would be covered and projects to at least harden (and why not move forward) the insane amount C and C++ code out there would also get covered. (Today there was a C ISO about this popping to make this happen) Trying to rewrite and if they see a chance, make hostile takeover of the projects might backfire and kill the host, because there's no guarantee that the knowledge, which is the actual important part of a project, will pass over in the process. The real secret of C and C++ its not the syntax, but the time to form champions and knowledge. Those key people form knowledge around certain topics and they are formed together to build things. The same thing is happening in Go , Rust and whatever else right now. In the case of Android for instance, where a hard line was drawn in the floor, there's a chance this changes dynamics in a way that, while i believe less memory safety errors will happen, it might drain the project in the long run, because dealing with such a big project with more than one language its a daunting task in a schizophrenic codebase. People will be forced to learn Rust or get more and more sidelined in the org. Some will byte, but others will jump. In this process a lot of shiny material might get lost, and there's no guarantee that they will be passed over to the new code. In the case of Linux nothing will happen really, its just a drop in the ocean, and maybe a virtualization package appears here or there, and that's why Linus didn't even bothered that much, he only was worried about those modules not freezing the kernel. But in he case of Curl, Daniel is quite aware of the real motives and the dangers around it, but maybe the next guy isn't. This org have an agenda. No problem with the agenda, but be open more about it or change course (really using the money for security in general). By being open it also needs to say it when collect money from donors, so that X that was to donate money to Curl anyway don't get deceived into funnel its money into this org with a secondary agenda that might even turn out badly for the open source project. Its not about C or C++ here, its about all the gold that is out there in those languages sometimes gold that will be not replaced, because its more about the human factors, dynamics and chance than language petty peeves. Yes i understand how important memory safety is, and i want more of it and i like that Rust found a way to back it into the language and forced others to think more about it.. But lets not destroy the Sistine Chappel's out there because of ego, specialists thinking in unidimensionals aspect unaware of the other damages in the long run, and blind and/or young cultist followers that are just surfing in a feel good hype of belonging to something. Just try to create your "Sagrada Familia" in Rust. The raison d'autre that you've cited will guarantee that there will be not very great things in Rust given the small industrial-era mentality. While by attracting builders and original thinkers it will..