Proposal keyword 'outer'
Rémy Mouëza
Rémy_member at pathlink.com
Tue Jun 20 12:31:47 PDT 2006
In article <e793to$28or$1 at digitaldaemon.com>, Jarrett Billingsley says...
>
>"Frank Benoit" <keinfarbton at nospam.xyz> wrote in message
>news:e78h69$104t$1 at digitaldaemon.com...
>
>> For inner classes and mixins, it would be good to have a reference to
>> the next outer scope.
>
>Agree. It's dumb to have the context pointer there, but inaccessible.
>
I've played with mixin inheritance :
# template Mix ( T )
# {
# class Mix : T
# {
# void method ( something )
# {
# super.method ( super.stuff, something );
# ...
# }
# }
# }
Then one can add behaviours and attributes to an existing class:
# auto mixedIn = new Mix !( MyPoorLittleClass ) ;
and the mixin code have access to the enclosing context through the super
pointer.
It may help waiting the outer keyword.
More information about the Digitalmars-d
mailing list