3 ms·
Literally every other language with unsigned types handles this just fine?
by binarymax 1y ago
Literally every other language with unsigned types handles this just fine?
- pron 1y agoBy no means do C or C++ handle unsigned types just fine. In fact, they're widely recognised as a source of problems even by those who think they're useful (when used carefully).
- hashmash 1y agoI guess it depends on what "just fine" means. What happens when a conversion is applied? Is there silent data corruption (C), or is there an exception (Ada, D) or perhaps a panic (Rust, Zig)? Is the behavior dependent on compiler flags? Keeping unsigned integer types out of the language makes things much simpler, and keeping things simple was an original design goal of Java.