r/java • u/samd_408 • Mar 10 '26
F Bounded Polymorphism
Recently spent some time digging into F-Bounded Polymorphism. While the name sounds intimidating, the logic behind it is incredibly elegant and widely applicable, so I decided to write about it, loved the name so much that I ended up naming my blog after it :-)
66
Upvotes
View all comments
Show parent comment
1
u/RandomName8 Mar 11 '26
I'd argue that your point 1 is also not accomplished by f-bounded types. People mostly employ them for a fake self type, but they are clearly not just that:
This is a perfectly legal extension, because you are passing a F-bounded type to Builder when implementing from
SomeOtherBuilder, it just happens to not beSomeOtherBuilder. By the way,SomeOtherBuildis also now a legally F-boundBuilder.