Extension methods and API evolution

John Nilsson john at milsson.nu
Sat Dec 19 07:10:33 PST 2009


On Sat, Dec 19, 2009 at 1:58 PM, Mikael Grev <grev at miginfocom.com> wrote:

> So, having a method on the object itself is beneficial as it lowers the bar
> for finding out that it exist.
>
You could add better search features to the IDE to address this. But why
would you? There's probably millions of methods taking i.e. List as argument
that has no value for the context you are in. Why would I be more interested
in List.sort than say, List.persist, or List.sumInvoiceAmt for that matter
if I have a list of File objects in my current context?

Also, I'm no big fan of static imports everywhere so I would always type:
>
Might one ask why? I know I had one issue with them being that the IDE
didn't automatically add them to the import list when needed. However in
Eclipse it's possible to configure it to search predefined classes for
static methods to import. Which address both
your autocomplete discoverability and my automatic import problem.

BR,
John


More information about the lambda-dev mailing list