2 ms·
> BiFunction<String, Integer, Foo> fn That signature is awful. I never remember if the return type is first or the last in the list. Also the "generic" types d
by ahtihn 3y ago
> BiFunction<String, Integer, Foo> fn
That signature is awful. I never remember if the return type is first or the last in the list. Also the "generic" types don't document anything, by design. Yes it's an actual type but it's too generic to have any value over something like Kotlin or Scala declaration. It's impossible to tell from this signature what the input and output types are supposed to represent.
Almost always it's better to define a new functional interface than using BiFunction or similar.