3 ms·
Java already has everything you need for unsigned integers doesn't it? You just use the normal int type, and then use methods like Integer#compareUnsigned inste
by chrisseaton 5y ago
Java already has everything you need for unsigned integers doesn't it? You just use the normal int type, and then use methods like Integer#compareUnsigned instead of language operators.
- da_chicken 5y agoThis reads like, "VisualBasic already has everything you need for pointers. You can define your own classes and pass by reference."
- chrisseaton 5y agoNot sure what you mean, sorry? Are you just objecting to the verbosity of method calls over operators? Yes it's a bit annoying, but the functionality is all there.
- pkolaczk 5y agoIt is very easy to mess up signed with unsigned then - because they are the same static type. You have to put comments in the code to clarify the interpretation of bits.
- chrisseaton 5y agoSo yes it's also error-prone. But there's no overhead, as the original comment implied.