You are currently viewing Has the complexity of `this` been a trouble in your experience?

Has the complexity of `this` been a trouble in your experience?

I understand that Kotlin’s flexible extension method is a good tool for building DSL and simplify code. But as a consequence,

this

becomes complex in Kotlin. When there is a

call(...)

, it might be calling a imported function or calling a method of

this

which could be the current instance of class, current extended type for extension method, or current receive type for a lambda expression. Has this ever confused you or made trouble in your experience?

submitted by /u/Jason5Lee
[link] [comments]