Here's an example: unsigned int length_a = 10; unsigned int length_b = 20; if (length_a - length_b < 0) { printf("negative diff\n"); } else { printf("positive diff\n"); } I would argue that there is plenty of code like…
It does not express intent. I remember being a junior C programmer and using "unsigned" to express my intent (it's greater than or equal to zero). In reality, like all C keywords, it's completely misleading and actually…
Is it called "unsigned" though? In Racket (and in mathematics) we call those natural numbers. The very notion of "unsigned" was invented by video game programmers at Bell Labs. In mathematics positive numbers are still…
The argument is really strange. It says that unsigned ints can't become negative and it's a good thing. But they do that by instead having crazy high values. How is that a win? You could argue that it doesn't matter…
Here's an example: unsigned int length_a = 10; unsigned int length_b = 20; if (length_a - length_b < 0) { printf("negative diff\n"); } else { printf("positive diff\n"); } I would argue that there is plenty of code like…
It does not express intent. I remember being a junior C programmer and using "unsigned" to express my intent (it's greater than or equal to zero). In reality, like all C keywords, it's completely misleading and actually…
Is it called "unsigned" though? In Racket (and in mathematics) we call those natural numbers. The very notion of "unsigned" was invented by video game programmers at Bell Labs. In mathematics positive numbers are still…
The argument is really strange. It says that unsigned ints can't become negative and it's a good thing. But they do that by instead having crazy high values. How is that a win? You could argue that it doesn't matter…