JEP draft: Concise Method Bodies - extend this to local functions?
john.r.rose at oracle.com
Thu Sep 20 13:40:19 UTC 2018
On Sep 19, 2018, at 6:23 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
> I think there’s more immediate payback in doing the more constrained feature of concise method bodies first.
Also, local functions seem inevitably to expand into mutually recursive groups of locals.
("Why can't I do factorial? …")
There are some design ideas for all that, but it's complicated enough on its own that it
has to be done on its own or as part of a larger project.
And FTR I am very enthusiastic about CMB's: They are a decisive improvement
in Java's ability to do software reuse at method granularity. They include both
static and dynamic delegation as special cases, which are patterns Java hasn't
been so good at to date. I remember proposals for first-class delegation support
in the past, and CMB's subsume those, IMO.
More information about the amber-spec-observers