External Publication
Visit Post

Could you borrow a bit?

Rust Internals [Unofficial] May 18, 2026
Source

steffahn:

or you’d need to implement modifications of individual bits in a byte with atomic operations.

It would be nice if the language could do that for us so we can have a &mut u1 type that works like any other (possibly fat) reference. Ideally the compiler would also optimize away the atomic-ness whereever possible of course. This doesn't seem too different from the fact that working with individual bytes can be slower for the hardware than working with larger ints, but we don't force people away from using bytes.

Discussion in the ATmosphere

Loading comments...