|
|
|
|
|
by tatterdemalion
3679 days ago
|
|
Ranges are used in a lot of places in Rust (over sequential collections, for example). Bit operations are used to engage with low level system APIs like this or for modular arithmetic, which is not common in Rust. As A Rust user, I absolutely know what a range is, and find the `set_range` function very intuitive. I have to drop into messing around with bitwise AND only rarely, and as someone who only wrote a small amount of C before Rust, it is always an exhausting effort. |
|
As for the bit ranges, it looks backwards to me, since bits are normally numbered high to low. I would find it easier to read if it read:
I can "see" that much easier.