News for hackers. Stuff that matters.
Re:Fluent: Static Extension Methods for Java by jdmichal on Monday July 03, 2023 @12:17PM (#36575095)
They're more discoverable, because typing in `object.` tells the IDE that you are looking for methods on the type of `object`. If the IDE is aware of extension methods, it can also expose them the same as instance methods.

Java specific: If you're looking for a static utility method, then `UtilClass.` will also autocomplete. However, what if the function you're looking for isn't in `UtilClass`, but `SomeOtherClass`? What if you don't even know whether a method already exists for what you're trying to accomplish, and it could possibly exist in multiple libraries? Your discoverability engine quickly becomes Google.

There are no comments on this comment yet.