| ▲ | bluGill 4 hours ago | ||||||||||||||||||||||||||||||||||||||||
The other things I've seen beginners do is throw unsafe at everything. | |||||||||||||||||||||||||||||||||||||||||
| ▲ | tredre3 4 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||
The things that unsafe enables are arbitrary pointers, FFI, and accessing union members in a C struct. It seems highly unlikely to me that unsafe would fix any beginner's problem. .clone() on the other hand is indeed an easy/quick fix for a lot of issues you'd face when learning rust. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| ▲ | uecker 3 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||
Yes, but this this is not a problem at all because any bug caused by misuse of unsafe (or unwrap) is entirely the fault of the programmer (or the AI) and not of Rust. /s | |||||||||||||||||||||||||||||||||||||||||