On Fri, 23 Jan 2026 19:50:49 GMT, Joe Darcy <[email protected]> wrote:

> First cut at adding modeling interfaces for the algebraic structures of 
> rings, groups, and fields.

I apologize for writing this here, but I'm concerned about why operators are so 
narrowly grouped together. And why aren't the operand and return types 
separated? These are quite restrictive.

Using this type of operator, it's impossible to emulate, for example, matrix 
and vector multiplication. Because the operands are different types. And the 
language already has an example of similar constructs—the string addition 
operator, which takes a string and something else to produce a string again. 
I'd like the operator mechanism to be able to fully model the current behavior 
of the language. So that instead of a rigid construct within the compiler, the 
string addition operator could be modeled in the same way as other operators.

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

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

Reply via email to