Hal-5700X@sh.itjust.works to Technology@lemmy.worldEnglish · 21 hours agoMicrosoft wants to replace its entire C and C++ codebase, perhaps by 2030www.theregister.comexternal-linkmessage-square61fedilinkarrow-up1161arrow-down110cross-posted to: technology@lemmy.zip
arrow-up1151arrow-down1external-linkMicrosoft wants to replace its entire C and C++ codebase, perhaps by 2030www.theregister.comHal-5700X@sh.itjust.works to Technology@lemmy.worldEnglish · 21 hours agomessage-square61fedilinkcross-posted to: technology@lemmy.zip
minus-squareMartianSands@sh.itjust.workslinkfedilinkEnglisharrow-up6·12 hours agoThe safety designed into Rust is suddenly foreign to the C family that I’m honestly not sure you can do that. Even “unsafe” Rust doesn’t completely switch off the enforced safety
minus-squareInnerScientist@lemmy.worldlinkfedilinkEnglisharrow-up2·8 hours agoYeah, to quote the manual: "[Unsafe Rust allows you to] Dereference a raw pointer. Call an unsafe function or method. Access or modify a mutable static variable. Implement an unsafe trait. Access fields of unions. […] The unsafe keyword only gives you access to these five features that are then not checked by the compiler for memory safety." https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html
The safety designed into Rust is suddenly foreign to the C family that I’m honestly not sure you can do that. Even “unsafe” Rust doesn’t completely switch off the enforced safety
Yeah, to quote the manual:
"[Unsafe Rust allows you to]
[…] The unsafe keyword only gives you access to these five features that are then not checked by the compiler for memory safety."
https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html