Would you like signs with those chars?
Would you like signs with those chars?
Posted Oct 24, 2022 20:08 UTC (Mon) by cesarb (subscriber, #6266)Parent article: Would you like signs with those chars?
Another advantage of making "char" always unsigned: it better matches Rust. In Rust, a string constant can be viewed as an &[u8] (actually &str, but str is nothing more than an [u8] which is guaranteed to contain valid UTF-8), so it can be argued that Rust's equivalent to a bare "char" would be u8, which is unsigned.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
