Earlier quoted context omitted.
> Isn't unsafe still bypassing the borrow checker, in the sense that you're mostly using it because you're doing something the borrow checker does not otherwise allow? Not really. But using raw pointers and converting to/from memory addresses isn't something borrow checker can check. It's a borrow checker not address verifier. E.g. you can take raw pointer, and set two mutable variables to point to it and borrow chec…
> E.g. you can take raw pointer, and set two mutable variables to point to it and borrow checker can't know they point to same address. That sounds an awful lot like bypassing the borrow checker. > As far as I know Zig can't say well these two functions can run in parallel because they are at compile time guaranteed to never access same resources and it's impossible to bypass it (outside unsafe). And their content is…
I guess you could argue it's bypassing borrow checker in weakest possible sense.
Borrow checker checks borrow. You aren't borrowing you are doing pointer manipulation, and presenting it with stuff that isn't its duty to check. I argue for this because people think that unsafe region is no mans land and that rules of borrow checking don't exist there.
That said, miri should be able to check your unsafe for undefined behavior. https://pramode.in/2020/11/08/miri-detect-ub-rust/
> Rust is going to force you to write your program in a certain way to achieve this. There are many other approaches you may be able to use in an unrestricted language which reach a correct and potentially more performant result which are correct, but which rustc cannot verify are correct.
Yes. It is a small downside, with a huge upside. Seatbelts prevent full mobility but I bet you wouldn't advocate for removing them because crashes rarely happen, and they limit your ability to move during driving.
> but that's not the only way to write a correct program which guarantees that
Rust has a provable way to eliminate a set of errors. You'd need to offer hard proof that code you wrote in alternative way, wouldn't have those issues.
And that alternative way might still be expressible in Rust using some abstraction/unsafe.
> How exactly do you come to the conclusion that Excel and Access are better at delivering value than other programming languages?
You mentioned how Python enabled more people to code. I'm willing to bet if only enabling to code then Excel and Access brought programming to more people, yet we don't see them in use, because maintaining is painful and hair tearingly frustrating. And performance is meh as well, but Python isn't winning any speed medals either.
> It takes it for granted that lack of memory safety in a systems language is "a regression". That's not an established consensus.
I value code that has less footguns than more footguns. Rust showed we can eliminate several cases of footguns, so why add them back? In that sense it's a regression. If you don't value memory safety and enjoy figuring out debugging data races, go nuts. Remove the seatbelts, you probably won't crash. However, if you do - It won't be pretty.
> That's one opinion. There are many who disagree.
3+ billion humans use spaces and punctuation as a error checking mechanism. IDOUBTYOUWANTTOGOBACKTOHOWROMANSDIDIT