log4rs icon indicating copy to clipboard operation
log4rs copied to clipboard

Shrink unsafe block for the imp mod

Open peamaeq opened this issue 3 years ago • 1 comments

peamaeq avatar May 18 '22 04:05 peamaeq

@peamaeq First, I appreciate the PR and really appreciate others taking a critical eye to log4rs. My concern here is that we're not actually making things any safer and that by shrinking the unsafe block it can obfuscate what is "unsafe". To see what I mean have a look at this chapter of the rustnomicon. The essence is that even safe code can be "unsafe", for example, it's not the free that is undefined, it's the dereference, and dereferencing a pointer is not unsafe. This is all to say, while I agree we should strive to minimize unsafe code in rust, I think this changeset comes at too high a cost to readability.

estk avatar Jun 10 '22 14:06 estk

Closing no response

estk avatar Feb 10 '24 03:02 estk