← Back to context

Comment by pjmlp

20 hours ago

Java doesn't have unsigned as primitive types, because James Gosling did a series of interviews at Sun among "expert" C devs, and all got the C language rules for unsigned arithmetic wrong.

Yes I miss them in Java as primitives, however there are utility methods for unsigned arithmetic, that get it right.

The way he conducted those interviews, and the conclusions he drew from them, may have been flawed. Because the situation now is that C has unsigned types and Java mostly has not.

And despite all pitfalls especially around mixing signed and unsigned in C, unsigned types are very useful, I'd in fact say that for low-level programming they are essential.

  • Doesn't seem to affect the extent Java is used across the industry, including many workloads that in the last century companies would use C instead.

    Books like Yourdon Structured Method were mainly targeted to business C back in the day.