Re:Zlib-rs is faster than C
by timschmidt on Sunday March 16, 2025 @05:23PM
(#43382457)
The compiler won't allow you to compile such code without the unsafe. The unsafe is *you* promising the compiler that *you* have checked to ensure that the address will always be legal. So that the compiler will allow you to compile the code.
[ Parent
| on HN ]
Re:Zlib-rs is faster than C
by steveklabnik on Sunday March 16, 2025 @05:24PM
(#43382475)
Right, I'm saying "allow" has two different connotations, and only one of them, the one that you're talking about, applies.
Re:Zlib-rs is faster than C
by timschmidt on Sunday March 16, 2025 @05:37PM
(#43382596)
I gotcha. I misread and misunderstood. Yes, we agree.