On Sat, 24 Jan 2026 05:14:16 GMT, Vladimir Kozelkov <[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.

@vova7878 Such discussions are premature.  This PR is an experiment, nothing 
more.  We will take what we've learned from the various experiments and bring 
them to the actual design discussions, when they happen.  But for now, this is 
just a place to stash an experiment.

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

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

Reply via email to