Unsigned Integers (was: Support for 64-bit pointers)

Mark Raynsford org.openjdk at io7m.com
Fri Jan 1 20:52:47 UTC 2021


On 2021-01-01T21:23:09 +0100
Johannes Kuhn <info at j-kuhn.de> wrote:

> To chime in - there is already limited support for unsigned int / 
> unsigned long.

The issue here is the lack of primitive classes, and those are being
worked on in Valhalla. We can define all of the operations required to
make a class behave almost identically to an unsigned integer today -
as long as we're willing to live with the values of that class having
the same performance characteristics as the primitive wrappers
(Integer, Double, etc).

I have no doubt whatsoever that Java will sprout all kinds of new
numeric types (unsigned, complex, etc) when Valhalla is ready, but it's
not ready yet. Unsigned types won't happen as part of Panama.

-- 
Mark Raynsford | https://www.io7m.com



More information about the panama-dev mailing list