News for hackers. Stuff that matters.
Re:What Is Rust's Unsafe? (2019) by kibwen on Sunday April 10, 2022 @02:49PM (#30980379)
If I were to go back and do it again I'd propose to rename unsafe blocks to something like `promise`, to indicate that the programmer is promising to uphold some invariants (the keyword on function declarations would still be `unsafe`). (Of course the idea of a "promise" means something different in JavaScript land, but I'm not worried about confusion there.)
Re:What Is Rust's Unsafe? (2019) by ChadNauseam on Sunday April 10, 2022 @03:03PM (#30980523)
While we're at it, I also would have preferred `&uniq` over `&mut`.
Re:What Is Rust's Unsafe? (2019) by j-krieger on Monday April 11, 2022 @08:05AM (#30987545)
And from the great Steve Klabnik himself: StrBuf instead of „String“
Re:What Is Rust's Unsafe? (2019) by gpm on Sunday April 10, 2022 @06:34PM (#30982400)
I still like `trust_me`, maybe a bit unprofessional in some contexts though.