3 ms·
> so they went with signed only types Except chars > At least Java 8 introduced unsigned math helper methods. They still aren't enough IMO. They don't have w
by kodablah 9y ago
> so they went with signed only types
Except chars
> At least Java 8 introduced unsigned math helper methods.
They still aren't enough IMO. They don't have way ways to take LE/BE bytes out of integers or vice versa (not worth creating ByteBuffer for). I always end up recreating these utilities in projects where it isn't worth depending on or shading an entire Guava, e.g. [0]
0 - https://github.com/cretz/javan-warty-pig/blob/master/fuzz/src/main/java/jwp/fuzz/Util.java https://github.com/cretz/javan-warty-pig/blob/master/fuzz/sr...
- pjmlp 9y agoYep, lack of unsigned primitive types belongs to my list of Java pet peeves.