Of course, it may look a bit superficial but it is super important for
nice DSLs like in Gradle.

could you give an example of a more complex closure usage?

=

Sure, basically you can have that kind of configuration=
:

dependencies {

=C2=A0 =C2=A0compile =
39;...'

}

=C2=A0

(the method is dependenc=
ies(Action<? super DependencyContainer>, and we generate a Closure ve=
rsion at runtime) or:

repositories { // Action<=
? super RepositoryHander

=C2=A0 =C2=A0maven { Action<? super M=
avenRepository>

=C2=A0 =C2=A0 =C2=A0 =C2=A0 url '....'=

=C2=A0 =C2=A0}

}

We should be also aware that this change may break code, since it is semant=
ic change and a local method of the same name will no longer be called if i=
t exists on the delegate. A functional interface is after all not something=
that came really to exist with java8 only, Callable and Runnable are examp=
les that existed before and work with Closure already.

Implementation wise to have something like

void configure(Action<Person> config) {
config.execute(person)
}

working we need to set the delegate to person, but we don=C2=B4t know perso=
n before the method invocation. This means the proxy for the Action delegat=
ing to the closure config represents must also make the delegation setter c=
all.

And there is also the problem of what we do if Action contains default meth=
ods - I do not consider our current solution as appropriate anymore. But of=
course that is not essential for the idea at hand.

I have a patch that does the work for =
functional interfaces already:

Doing the same for abstract classes should be straightforward. =
For static compilation, it's going to be more complicated and probably =
requires transparently invoking a configurer (like Gradle does).