In this answer, I used a
java.util.List as a parameter to an anonymous function (lambda) answer. So, my question is,
Should this import be counted to the byte total?
I know, it feels like the obvious answer should be YES - if you don't
import java.util.*, my example usage won't compile.
However, it's not that simple. I could declare the type (which we don't score) as
BiConsumer<java.util.List<String>, String> - use the full name instead of importing - and then everything would be fine and dandy. To blur the line further, say an external class has a method that takes a
BiConsumer<List<String>, <String>. Then, in my test class I could use this lambda without ever referencing the
java.util package at all!
To clarify, On scoring imported functions refers to scoring a submission of a default method, where this is still scoring a lambda. The issue here is does the import statement need to be counted in the score, as it is possible to compile the lambda without the import but only under very specific conditions.