Why the scattered generic types?

The Java syntax doesn’t scale to other kinds of type parameter constraints (e.g. the no-argument constructor constraint that has been requested on multiple occasions). The && syntax could probably work. However, we had a fairly hard time coming up with meaningful examples for multiple type parameter constraints, so it doesn’t look like these restriction actually come up often enough to invest any effort into changing the current syntax.

1 Like