Yes, I would love this kind of thing On 20 March 2018 at 10:41, Cédric Champeau <cedric.champ...@gmail.com> wrote:
> Hi, > > One of the Kotlin features I really like is the short-hand notation for > simple expression methods: > > class Foo { > fun truth(): Integer = 42 > } > > For example, in Groovy, you write: > > @Controller("/") class HelloController { > > @Get("/hello/{name}") > String hello(String name) { > return "Hello $name" > } > } > > > but we could write: > > @Controller("/") > class HelloController { > @Get("/hello/{name}") > String hello(String name) = "Hello $name" > } > > > It's more concise and makes the "functional style" more readable. Is this > something Groovy users would appreciate? > >