New JEP: Concise Method Bodies

Kevin Bourrillion kevinb at google.com
Thu Sep 20 20:24:32 UTC 2018


Oh yes, I do know there are many applicable cases.  If I do the research on
this I think *all* it will tell me is "yes, there are many applicable
cases".

My claim is, indeed, that we should be valuing the savings of a `return`
keyword at "very low" - in fact, so low that it is outweighed merely by the
Paradox of Choice.



On Thu, Sep 20, 2018 at 1:11 PM Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:

>
>
> On 20/09/18 20:05, Kevin Bourrillion wrote:
>
> In this case, I think the `=*` *form *might* also clear that bar because
> of the automatic parameter pass-through. But I cannot currently see how the
> `->` form comes close to clearing it.
>
> Not sure I get it - surely every getter might benefit form this?
>
> int getX() -> x
>
> instead of
>
> int getX() { return x; }
>
> You could claim that the gain is minimal, but I'd suspect there's lots of
> applicable cases?
>
> Maurizio
>


-- 
Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at google.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180920/17378f86/attachment.html>


More information about the amber-spec-experts mailing list