vertx-lang-kotlin icon indicating copy to clipboard operation
vertx-lang-kotlin copied to clipboard

Delegate Properties

Open okou19900722 opened this issue 6 years ago • 1 comments

I have an idea which learned comes from gradle. We can write some extension function to implements delegate a properties. It's like this:

val key : String by json

it's same with this code

val value = json.getString("key")

also we can do it in other container, like Context, MultiMap or Session etc...

okou19900722 avatar Mar 01 '19 03:03 okou19900722

It seems like a really cool idea. Looking at Property Delegate Requirements it is possible to do it by using extension functions. However, I'm not sure if these extensions can be autogenerated. Do you have already a plan on how you want to implement it?

gmariotti avatar Mar 01 '19 16:03 gmariotti