Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
gronpi
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
gronpi
1y ago
Deferring to runtime is not always great, since not only can it incur runtime overhead, the code can also panic if a violation is detected.
2.
▲
by
gronpi
1y ago
The new borrow checker is not yet all that fast. For instance, it was 5000x slower, according to a recent report. https://users.rust-lang.org/t/polonius-is-more-ergonomic-tha... >I recommend watching the video @nerd
3.
▲
by
gronpi
1y ago
It requires that the libraries you use do not have UB. If you have no unsafe, but your library does, you can get UB. https://github.com/rust-lang/rust/pull/139553 This is why it may be a good idea to run MIRI
4.
▲
by
gronpi
1y ago
>There is no reason a language like Rust can't be designed with much more sensible strict aliasing rules. The aliasing rules of Rust for mutable references are different and more difficult than strict aliasing in C and C++. Strict a
5.
▲
by
gronpi
1y ago
And TBAA is much easier for programmers to wrangle than the aliasing of Rust, right? The corresponding aliasing feature for C would be _restrict_, which is rarely used. Though Linus and Linux turns off even strict aliasing/TBAA.
6.
▲
by
gronpi
1y ago
One example of MIRI not being guaranteed to handle all cases. https://github.com/rust-lang/rust/pull/139553#issuecomment-2... The above issue was part of diagnosing UB in Rust stdlib.
7.
▲
by
gronpi
1y ago
In C, you can alias pointers if they have compatible types. Not the case in Rust for mutable references. And the rules of Rust have tripped up even senior Rust developers. https://github.com/rust-lang/rust/commit&#