See sample class
class A {
var proxy: A
init () {
proxy = self
}
}
In Java, i could do something like this
class A {
A proxy;
A () {
proxy = this
}
}
so when i instantiate A sample = new A();
the proxy variable will be set to the "this" keyword.
But in Swift, the only related keyword to it is self but it does not behave the same way. It merely serves somewhat of a pointer to properties and methods that it belongs to it.
Is this possible in Swift? if yes, how to go about this? I could not find any solution (perhaps because there is a term for that style? which I have no clue about)
thoughts?