Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

An 8-bit byte can hold 256 values, from 0 to 255, and cannot hold a value = 256, whatever the philosophy is.


Read what dancek said again. In Rust `a..b` means

    a <= x < b
So 0..256 is

    0 <= x < 256
That is "less than" 256. There's no equals (that would be `0..=256` in Rust).


Oh my....

Well, I guess the author realized about the confusion in every other non-Rust programmer it generates (https://git.ralfj.de/web.git/commitdiff/13622f8642fc071bedf3...).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: