type classes prototype
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Jan 13 11:13:00 UTC 2026
Hi all,
over the past few months we've been experimenting with an implementation
of a type class feature along the lines of what Brian presented at last
JVMLS [1]. This work is being added to the new "type-classes" branch as
part of this PR:
https://github.com/openjdk/valhalla/pull/1886
While this is all still highly experimental, and a long way from being
JEP-ready, we thought it might be worth sharing it here, as doing so
will enable bleeding edge hackers (such as ourselves!) to carry out
further experimentation, especially in the context of providing better
support for new Valhalla-based numeric types [2].
More details on how the prototype works and which features it enables
will be shared in due time, as we gather more experience with this
feature. In other words, this is venue for experimentation, and NOT a
proposal for inclusion in the Java platform, and any feedback should be
providied while keeping that in mind.
Cheers
Maurizio
[1] - https://www.youtube.com/watch?v=Gz7Or9C0TpM
[2] - https://www.youtube.com/watch?v=xCdJb_zI5us
More information about the valhalla-dev
mailing list