News for hackers. Stuff that matters.
Re:How Many Type Parameters Can a Java Method Have? by deathwarmedover on Monday April 29, 2019 @08:47AM (#19777819)
I wonder if it would be feasible to scan, say, GitHub or Apache projects to find the highest parameter count in the wild?
Re:How Many Type Parameters Can a Java Method Have? by erdeszt on Monday April 29, 2019 @09:11AM (#19778013)
Do you mean type parameters or regular parameters? If it's the former(and Scala is allowed) then I think Rho's Result type is a pretty good bet with it's ~60 type arguments: https://github.com/http4s/rho/blob/989db04e6dd828518770a42fd...
Re:How Many Type Parameters Can a Java Method Have? by nkkollaw on Monday April 29, 2019 @10:25AM (#19778595)
Ugh, why would they do that?
Re:How Many Type Parameters Can a Java Method Have? by lmm on Monday April 29, 2019 @01:06PM (#19780229)
Looks like the type tells you which HTTP status codes are possible from a given route, so that e.g. a route that can return only 200 or 403 is a different type from a route that could return 302. Which makes a lot of sense, because certain transformations / routing directives that you might want to do only make sense for particular HTTP status codes.
Re:How Many Type Parameters Can a Java Method Have? by saagarjha on Monday April 29, 2019 @08:56AM (#19777889)
From the other news on the front page, scanning the former should now give you the latter as well :)
Re:How Many Type Parameters Can a Java Method Have? by aiCeivi9 on Monday April 29, 2019 @09:06AM (#19777974)
I can bet it will be Spring. It was always in Top 3 for thing like:

- longest method name

- longest class name

- deepest inheritance tree

Re:How Many Type Parameters Can a Java Method Have? by peeters on Monday April 29, 2019 @09:10AM (#19778011)
Doubtful. I'd guess it's a general utility library like Guava, where they're doing something with heterogeneous type "vararg" methods. Often they'll have a number of overloads to give the most type help, before reverting to less helpful vararg types.

Anything that's heterogeneous, with dynamic arity to the library but known static types to the caller would be a good candidate. Like NTuple type implementations.