▲ 153 ▼ Borrow Checker (programming.dev) submitted 3 years ago by dukk@programming.dev to c/programmer_humor@programming.dev 13 comments fedilink hide all child comments
[–] Xylight@programming.dev 10 points 3 years ago (1 child) best solution to all rust problems /s permalink fedilink source parent hideshow 2 child comments replies: [–] henfredemars@lemmy.world 0 points 3 years ago (1 child) This might be the wrong place for this question, but I have heard criticism that real rust programs contain lots of unsafe code. Is this true? permalink fedilink source parent hideshow 2 child comments replies: [–] Zyansheep@vlemmy.net 12 points 3 years ago (1 child) Define what makes a rust program "real" lol. Any kind of library that does a lot of low-level stuff (kernel syscalls, custom binary reprs, ffi) will have to use unsafe. But most applications built using these libraries rarely need to use unsafe at all, because the libraries act as safe wrappers to make sure the app developer isn't accidentally violating invariants allowed by the "unsafe" keyword. permalink fedilink source parent hideshow 2 child comments replies: [–] lightsecond@programming.dev 4 points 3 years ago Yeah. For example Lemmy backend is written purely in Rust and doesn’t use unsafe anywhere, but some lower-level library it uses probably does use unsafe for IO code. permalink fedilink source parent
[–] henfredemars@lemmy.world 0 points 3 years ago (1 child) This might be the wrong place for this question, but I have heard criticism that real rust programs contain lots of unsafe code. Is this true? permalink fedilink source parent hideshow 2 child comments replies: [–] Zyansheep@vlemmy.net 12 points 3 years ago (1 child) Define what makes a rust program "real" lol. Any kind of library that does a lot of low-level stuff (kernel syscalls, custom binary reprs, ffi) will have to use unsafe. But most applications built using these libraries rarely need to use unsafe at all, because the libraries act as safe wrappers to make sure the app developer isn't accidentally violating invariants allowed by the "unsafe" keyword. permalink fedilink source parent hideshow 2 child comments replies: [–] lightsecond@programming.dev 4 points 3 years ago Yeah. For example Lemmy backend is written purely in Rust and doesn’t use unsafe anywhere, but some lower-level library it uses probably does use unsafe for IO code. permalink fedilink source parent
[–] Zyansheep@vlemmy.net 12 points 3 years ago (1 child) Define what makes a rust program "real" lol. Any kind of library that does a lot of low-level stuff (kernel syscalls, custom binary reprs, ffi) will have to use unsafe. But most applications built using these libraries rarely need to use unsafe at all, because the libraries act as safe wrappers to make sure the app developer isn't accidentally violating invariants allowed by the "unsafe" keyword. permalink fedilink source parent hideshow 2 child comments replies: [–] lightsecond@programming.dev 4 points 3 years ago Yeah. For example Lemmy backend is written purely in Rust and doesn’t use unsafe anywhere, but some lower-level library it uses probably does use unsafe for IO code. permalink fedilink source parent
[–] lightsecond@programming.dev 4 points 3 years ago Yeah. For example Lemmy backend is written purely in Rust and doesn’t use unsafe anywhere, but some lower-level library it uses probably does use unsafe for IO code. permalink fedilink source parent