More Readable Use Site extension Methods for java
serge.boulay at gmail.com
Mon Dec 13 05:42:54 PST 2010
agree, and most of us who have worked with the .net platform have come to
love this feature.
On Tue, Dec 7, 2010 at 10:42 AM, Llewellyn Falco <isidore at setgame.com>wrote:
> However, we remain opposed to use-site extension methods because we believe
> > that the author of an API should remain in control of their API.
> > users to monkey-patch in new functionality to existing types undermines
> > this
> > demarcation of responsibility.
> > (A further problem with use-site extension methods is the lack of
> > reflective
> > discovery. Consumers of classfiles (such as non-Java compilers like
> > as
> > well as templating mechanism such as JSP EL) cannot easily find these
> > extension methods.)
> Extension methods as stated ALREADY exist. the only difference is that they
> can be applied after the "." which effects readability.
> Let me restate this. The only argument here is READABILITY.
> i have a blog about this here:
> These type of methods aren't actually part of the object. It is just syntax
> to allow for readability. They don't give or takeaway any power from the
> "creator" of the object.
> As for readability, here's an example of the difference between the
> "reverse polish" notation enforced and the ability to write after the "."
> Make sense?
> Easy to read?
> let's try after the "."
> I believe there is a strong case that is more readable.
More information about the lambda-dev