https://kotlinlang.org logo
#getting-started
Title
# getting-started
k

karelpeeters

10/08/2018, 9:03 AM
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
    }
}