>>106342449

>Why does Rust force developers to learn the intricacies of unsafe and bear the maintenance burden of unsafe when they want to implement common algorithms like sorting algorithms efficiently?

Because random access is unsafe. If you want to guarantee that a user will NEVER write to invalid memory, then every random access on an array, slice, or vector has to be bounds checked. Do you want to not bounds check? Do you want to do things the C way? You use the unsafe keyword. Unsafe means "we're doing it the C way".

I challenge you to find a way to guarantee memory errors are impossible in user generated code while allowing random access to arrays without bounds checks.

Also, if you're complaining about having to learn new things, you need to kill yourself immediately. "Waaaaah, I don't want to read about the intricacies of..." Shut the fuck up and put a revolver in your mouth.