Comments by "Anony Mousse" (@anon_y_mousse) on "Low Level"
channel.
-
2200
-
102
-
65
-
63
-
59
-
41
-
40
-
32
-
30
-
29
-
29
-
23
-
17
-
15
-
14
-
14
-
14
-
13
-
11
-
11
-
11
-
11
-
To clarify, it's not that C, or for that matter C++, are unsafe languages, rather that too many programmers are unsafe. Rust doesn't actually provide a guarantee about safety, regardless of what its proponents will say, but it makes it slightly more difficult to do certain unsafe things by mistake. However, if you have to use an unsafe keyword, already a design mistake there, then you're going to be without certain protections. If you have to abstract around the use of the unsafe keyword it separates your code in an unnatural way that will make it harder to debug. So either you overuse the unsafe keyword and constructs that go with it, or you abstract. Neither is good, especially at kernel level. What we really need is better programmers who actually understand the underlying hardware and can write safe code. The most prevalent errors that programmers make are ones that are super easy to prevent, regardless of language. At least if you're not a dingus.
11
-
11
-
11
-
10
-
9
-
9
-
9
-
9
-
8
-
8
-
8
-
8
-
7
-
7
-
7
-
7
-
7
-
7
-
Rust won't prevent all errors and triggers errors on code that would otherwise work 100% perfectly fine. It's training wheels for newbies, but no one who wants the language to get out of the way so they can do real work should use it. If you write your code in a way similar to how Rust wants you to write your code then literally any language would work equally as "safely", except that most others will let you get on with the task of actually writing the code. If you have to integrate with anything closed source, and I know Rust hates closed source, but you introduce a possible security hole and if you're writing real code you're going to use someone else's libraries instead of implementing everything from scratch yourself. If you want to write code that's safe, using a library written in an older language, and which has been debugged for decades, will give you the best path to success. Also, from a purely aesthetic point of view, Rust is uglier than C++, and from a usability point of view it's far, far slower to compile which makes iterative design harder to do.
7
-
6
-
6
-
6
-
6
-
6
-
6
-
6
-
6
-
6