On Fri, 23 Jan 2026 20:29:23 GMT, Brian Goetz <[email protected]> wrote:

> I think we'll find that the return on modeling the algebraic structures 
> directly is less than we might think, because real-world numeric types like 
> Integer and Float aren't actually rings or fields. (Haskell has these 
> classes, but it keeps their operations separate from the mathematical 
> operators; while `Num` declares `(+)` and `(*)`, `Monoid` declares `mzero` 
> and `mappend`. But the logical conclusion of this is that they are not all 
> that useful to numerics at all, and I expect they will not carry their weight 
> in the end.)

Note 32-bit int arithmetic is a ring -- Integer.MIN_VALUE is its own additive 
inverse.

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/1957#issuecomment-3792296477

Reply via email to