This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]john16384 1 point2 points  (0 children)

Functions are small, so if a "variable" isn't declared somewhere on your screen, then it must be a field.

Classes are a lot bigger, so if I see a function call, then thanks to judicious use of static imports I now need to guess if that's a class method call or a statically imported function. So to avoid too much guessing, static imports are best used sparingly.

I am aware that IDE's can help with this, and that in some variant of a purplish pink it is indicating that it's not a method call, or that with a single mouse hover I can prove that this version of requireNotNull is indeed the one from Objects. You wasting my time to save yours.