| Thread overview | |||||
|---|---|---|---|---|---|
|
November 27, 2008 proposition classname.this | ||||
|---|---|---|---|---|
| ||||
Proposition: className.this for nested classes
for ex:
class Foo{
void fnc1(){}
class Bar{
void fnc1
void fnc2(){ Foo.this.fnc1; }
}
}
instead of:
class Foo{
Foo Foo_this(){ return this; }
void fnc1(){}
class Bar{
void fnc1
void fnc2(){ Foo_this.fnc1; }
}
}
| ||||
November 27, 2008 Re: proposition classname.this | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Zarathustra | Reply to Zarathustra,
> Proposition: className.this for nested classes
>
> for ex:
> class Foo{
> void fnc1(){}
> class Bar{
> void fnc1
> void fnc2(){ Foo.this.fnc1; }
> }
> }
> instead of:
> class Foo{
> Foo Foo_this(){ return this; }
> void fnc1(){}
> class Bar{
> void fnc1
> void fnc2(){ Foo_this.fnc1; }
> }
> }
I think that "outer" has been proposed for that as well.
| |||
November 27, 2008 Re: proposition classname.this | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Zarathustra | On Thu, Nov 27, 2008 at 12:39 PM, Zarathustra <adam.chrapkowski@gmail.com> wrote:
> Proposition: className.this for nested classes
>
> for ex:
> class Foo{
> void fnc1(){}
>
> class Bar{
> void fnc1
> void fnc2(){ Foo.this.fnc1; }
> }
> }
>
> instead of:
> class Foo{
> Foo Foo_this(){ return this; }
> void fnc1(){}
>
> class Bar{
> void fnc1
> void fnc2(){ Foo_this.fnc1; }
> }
> }
>
You can already access that through this.outer.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply