There's no problem with encapsulation, see eg this...
# getting-started
k
There's no problem with encapsulation, see eg this, which would be equivalent to using
this
in a default parameter:
Copy code
class Foo {
    val foo: Foo
    constructor(foo: Foo) {
        this.foo = foo
    }
    constructor() {
        this.foo = this
    }
}