News for hackers. Stuff that matters.
Re:Bugs that the Rust compiler catches for you by DeathArrow on Friday May 06, 2022 @01:07AM (#31281521)
>I hope Rust comes out as the winner in the current crop of possible C/C++ replacements

What makes you think C and C++ will be replaced?

I see no systems programming language that's simpler than C and no systems programming language as flexible as C++.

Being that C++ is huge already and its developers like to add features after features, it's almost guaranteed that you can find a subset of C++ that suits the way you like to work.

Re:Bugs that the Rust compiler catches for you by bluejekyll on Friday May 06, 2022 @02:24AM (#31281914)
Your comment seems to ignore all the evidence that shows approx, 70% of security related issues come from those memory unsafe languages. Two independent large companies found that same statistic on two entirely different and large code bases. Google and Microsoft.

You can ignore those findings as you like, but that is why so many people are interested in Rust.

Re:Bugs that the Rust compiler catches for you by pjmlp on Friday May 06, 2022 @07:02AM (#31283723)
Yet, those same companies are doubling down in C++ for many of their new projects.

Chrome isn't going to adopt any Rust, and Firefox is a few percentilies away to matter at all.

Android now has Rust, yet it isn't exposed to app developers, NDK is all about C and C++, as is the newly introduced AGK for game developers.

AMD/Intel/NVidia now employ many of the ISO C++ contributors and are pushing on using standard C++ as the lingua franca of GPGPU computing.

Azure Sphere, being sold as top security IoT device, has C SDK.

The new WinUI / WinAppSDK are mostly coded in C++, with bindings for other languages.

Apple just released C++ bindings for Metal, as alternative to the existing Swift ones.

So, yeah their business units don't seem to be very keen in following the security advices anyway.

Re:Bugs that the Rust compiler catches for you by bluejekyll on Friday May 06, 2022 @09:29AM (#31284840)
All of those are existing software products, the sunk cost into those is so high that overcoming is monumental. Firefox continues its journey. The better question is what should they do with new software.

The analogy I see is an industry similar to the auto industry as it decides what to do with their ICE based platforms as consumers are going after all electric.

Re:Bugs that the Rust compiler catches for you by pjmlp on Friday May 06, 2022 @09:33AM (#31284881)
Not really, AGK, Azure Sphere or WinUI/UWP are post the famous security reports.

Regular consumers are going electric when they become cheaper and usable as ICE vehicles, until then they are fine for rich people with garage.

Re:Bugs that the Rust compiler catches for you by pjmlp on Friday May 06, 2022 @01:40AM (#31281678)
People tend to forget that we use those languages, because the gatekeepers of certain platforms only offer them as supported option, with nice tooling and libraries.

Naturally one can bring others into the game, when they are willing to replace the platform owners in the whole stack beyond a bare bones compiler.

Re:Bugs that the Rust compiler catches for you by eternityforest on Friday May 06, 2022 @02:19AM (#31281888)
I don't see any reason a language needs to be simple, as long as the abstractions are close enough to zero cost. Since Rust can run on even 8 bit microcontrollers, it should be able to replace C in a lot of places.

There might be some set of tools out there that will make C++ as safe as Rust(It seems like some are talking about borrow checkers but finding it near impossible?), but Rust is designed for safety from the ground up.

Plus, even if your linter catches 100% of bugs, your libraries probably won't use those standards, and may be full of bugs.

Not that you'd ever do a JS-level amount of reuse in C, since the lack of standardized package management sometimes makes it not even worth it to use a library, almost like they actively want to discourage reuse.

Rust has a problem with some things being community that should be stdlib, but standard practice in C++ seems to be to reinvent way more wheels than other languages.

Re:Bugs that the Rust compiler catches for you by pjmlp on Friday May 06, 2022 @07:05AM (#31283736)
Re:Bugs that the Rust compiler catches for you by alkonaut on Friday May 06, 2022 @03:44AM (#31282471)
Memory safety just isn't going to be optional in most contexts. Whether you achieve it by a GC, borrow checker etc will be the option.

> I see no systems programming language that's simpler than C

I guess that depends on what "simple" means