Aug 27, 2026 · 42 min · 9 segments
OpenJDK's Project Valhalla is improving Java's support for custom numerical types. That goes beyond value types and also encompasses explorations into operator support. While Java is extremely…
Joe DarcyGuest
Nicolai ParlogHost
that, right? Well, we do have to be careful with terminology in this space, because there are mathematical meanings to the terms group, ring, and field in terms of abstract algebra that describe If you have a set of elements and operations on those sets of elements, if the operators have certain properties, you say that's a group, a ring or a field.

So the usual arithmetic properties we're used to in terms of simplifying expressions, that you can change the order of the operands of a multiply, for instance.

So we would say that multiplication is commutative, same with addition, or multiplication distributes over addition.

So all those properties we're used to are due to the field axioms, because real numbers are a field.

And there's a very rich mathematical studies behind all those kinds of structures and what they mean.

But it would also mean that when I use a plus, I mean like in the hypothetical future where type classes landed, when I use a plus, then my intuition about how plus works, you mentioned commutative, or the fact that it doesn't matter which order I resolve a series of pluses, the result will always be the same, that those intuitions, like Java would force me into... making MyPlus follow those same rules, right?

So this is an interesting question about what exactly does a plus or times mean? Yeah.

Because one of the reasons we looked at different kinds of numbers is because different kinds of numbers have different properties for their operators.

So for example, something we're used to from multiplying integers or real numbers is this commutativity property we mentioned, like A times B and B times A are the same.

So we know if we have a 1 by n matrix and we multiply it by another 1 by n matrix, we'll either get an n by n matrix or a 1 by 1 matrix, depending on which order we do them in.

And it was surprising to physicists when they started using it for quantum mechanics because it was unfamiliar to them.

So we don't want to constrain the solutions we have for the language features to assume that, well, everything you might want to multiply together, it has to be commutative because we know there are numbers or number-like objects people want to operate on, like matrices, that don't have all these properties.

that, right? Well, we do have to be careful with terminology in this space, because there are mathematical meanings to the terms group, ring, and field in terms of abstract algebra that describe If you have a set of elements and operations on those sets of elements, if the operators have certain properties, you say that's a group, a ring or a field.

So the usual arithmetic properties we're used to in terms of simplifying expressions, that you can change the order of the operands of a multiply, for instance.

So we would say that multiplication is commutative, same with addition, or multiplication distributes over addition.

So all those properties we're used to are due to the field axioms, because real numbers are a field.

And there's a very rich mathematical studies behind all those kinds of structures and what they mean.

But it would also mean that when I use a plus, I mean like in the hypothetical future where type classes landed, when I use a plus, then my intuition about how plus works, you mentioned commutative, or the fact that it doesn't matter which order I resolve a series of pluses, the result will always be the same, that those intuitions, like Java would force me into... making MyPlus follow those same rules, right?

So this is an interesting question about what exactly does a plus or times mean? Yeah.

Because one of the reasons we looked at different kinds of numbers is because different kinds of numbers have different properties for their operators.

So for example, something we're used to from multiplying integers or real numbers is this commutativity property we mentioned, like A times B and B times A are the same.

So we know if we have a 1 by n matrix and we multiply it by another 1 by n matrix, we'll either get an n by n matrix or a 1 by 1 matrix, depending on which order we do them in.

And it was surprising to physicists when they started using it for quantum mechanics because it was unfamiliar to them.

So we don't want to constrain the solutions we have for the language features to assume that, well, everything you might want to multiply together, it has to be commutative because we know there are numbers or number-like objects people want to operate on, like matrices, that don't have all these properties.
The rest of this transcript — segmented and speaker-labeled, so you land on the exact moment something was said
Search every transcript — by keyword, by phrase, or by meaning, across every show Radar indexes
Trends — what is surging across podcasts, measured against its own baseline
Alerts — when a name you follow appears in a newly indexed episode
No account is needed to search Radar.