Post

I feel like there's something about Rust's upfront betrayal of intuition for the sake of enforcing a specific kind of correctness that primes people to interpret every single decision its creators make as "holy gospel", even though some of them are extremely dubious.

Like, yes, I get that leaking memory is "safe" in the sense that it won't cause misbehaviors in the same way as, say, flipping wanton bits in your programs would, but I feel like I should probably have to try a bit harder than to just call Box::leak or mem::forget to achieve a leak.

Yes, I know you can just make a memory ouroboros instead and the compiler also won't bat an eye at that, but doing that still requires more effort on your part than an elementary function call!

0 reposts0 likes

No replies yet.