Hacker News new | ask | show | jobs
by nine_k 3558 days ago
Jaywalking when a street is empty is safe; it does not mean that jaywalking is safe in general, and that one should get used to it.

In this case, `.initialize` is likely also faster because any previous-value-checking logic than might be there is explicitly not used.

1 comments

When it's explicitly allowed by the rules, it's no longer "jaywalking."

You're right that it doesn't mean this is safe in general, but the original comment is wrong that you should never do this.

What previous-value-checking logic are you referring to? I would expect .pointee = 42 to compile down to a single store instruction.