Common arguments against Rust's safety guarantees:
- The library you're binding to can have a segfault in it.
- RAM can physically fail, causing dangling pointers.
- The computer the Rust program is running on can be hit by a meteorite.
- Alan Turing can come back from the dead and tell everyone that he actually made up computer science and none of it is real, thus invalidating every program ever made, including all Rust programs.
Announcement
Collapse
No announcement yet.
Google To Allow Rust Code In The Chromium Browser
Collapse
X
-
Originally posted by Lycanthropist View PostIt's not a myth even if Rust fanboys keep saying that. Truth is, you can write unsafe code in Rust as well. You have to, when interfacing with C code.
That's what C++ designers themselves acknowledge. Google recognises it, Microsoft recognises it, so do Mozilla, Discord, Dropbox, Apple, Facebook and others. But of course there are always random Joes on the internet who "know" It says more about the Denning-Krueger effect than about C++ if you ask me.
And of course it is possible to write unsafe code in Rust, although interfacing with C is a poor example because the whole lack of safety in that case comes from the C code and not from the unsafe binding declaration in Rust. But you will find that even unsafe Rust is actually safer (as in less unprovable) than "modern" C++.
PS: nobody says that Rust is forever a silver bullet or that there are no valid reasons to still use C++. But claiming that C++ is as safe as Rust because "I wrote a program in it that doesn't crash" doesn't make one some kind of elite, it just proves that one has no damn idea
- Likes 8
Leave a comment:
-
Originally posted by kpedersen View Postbecause dealing with the underlying system data (and C) is fundamentally unsafe.
Rust never claimed it could make other programms errors disapear. But replacing parts with rust shrinks the area you need to search for them.
- Likes 2
Leave a comment:
-
Originally posted by Anux View PostBut wouldn't you fix and search for them in the C++ section? What could you possibly do in the safe rust section to address those issues? Or do you mean compiler/language errors?
- Likes 1
Leave a comment:
-
Originally posted by Lycanthropist View PostWith containers and smart pointers, modern C++ can be just as memory safe as Rust. All memory related proplem stem from interfacing with older code. Rust has the same problem when having to interface with a C library.
What's interesting is I have been lucky enough to having worked with some of the best C++ developers in the business and while we didn't discuss Rust as such at the time, I often see that the more experienced a developer is the more they're willing to admit that we're very fallible and there will always be memory related issues in the code.
Rust have to interface with C code yes, but if the main bulk of your application is written in Rust the attack surface is vastly reduced and it's easier to validate the unsafe bits.
Unsafe code is perfectly valid Rust, it's just an agreement between the developer and the compiler where the developer says to the compiler "I know this is a piece of code you can't guarantee is safe, so I will make sure it is with extra care, peer review, careful testing, etc."
I find I spend much less time debugging with Rust. Once it compiles it's really just logic type errors I have to fix and they're usually easy to hunt down.Last edited by hyperchaotic; 13 January 2023, 02:59 PM.
- Likes 9
Leave a comment:
-
Originally posted by kpedersen View PostYour safe Rust sections could still be carrying an expired pointer around in its underlying layers. As my previous example showed, any high level memeory management system can quite happily hold dangling pointers ripped out by other systems.
- Likes 1
Leave a comment:
-
Originally posted by TuesdayPogo View Post
...because open-source people want stuff to be open-source? It's like asking why does anime fans like waifu and husbando. It just comes with the territory. Open-source people like open-source stuff, and don't like the opposite, naturally.
While I don't think it's that big of a deal, I do think that it's fair for people who cares about open-source to not like it and don't trust it because of that proprietary portion.
- Likes 1
Leave a comment:
-
Originally posted by jacob View Post
Isn't Vivaldi proprietary?Last edited by Vistaus; 13 January 2023, 12:38 PM.
- Likes 1
Leave a comment:
-
Originally posted by RejectModernity View Post
Proprietary garbage with Javascript interface.
Also, funny that you think the interface is garbage. Firefox users hate Chromium for how little you can do with the interface. Vivaldi allows the same thing as Firefox, yet its interface is “garbage”. Right…Last edited by Vistaus; 13 January 2023, 12:37 PM.
- Likes 2
Leave a comment:
-
Originally posted by kpedersen View PostI'm not sure. No longer can a single test suite be used. Different languages effectively introduce a black box that no single i.e static analyser can trace. Now you need multiple and they can't often talk to one another.
Leave a comment:
Leave a comment: