由于属性getter或setter通常既没有作为参数的函数,也没有reified类型,那么使用inline
属性的好处/用例是什么?
If the benefits would be to reduce cost related to method call, why not make all properties getter/setter inline by default?
如.
val foo: Foo
inline get() = Foo()
var bar: Bar
get() = ...
inline set(v) { ... }