Proposal keyword 'outer' (mixins)

Tom S h3r3tic at remove.mat.uni.torun.pl
Mon Jun 26 02:16:39 PDT 2006


Rioshin an'Harthen wrote:
> What about instantiating a mixin from an inner class? Wouldn't the first 
> outer then access only those items in the inner class, and a second one be 
> needed to get to the next class upwards?
> 
> Now, you would need to alias those symbols in the inner class for the mixin.

Yup, or use a different mixin. I don't think it's a big deal. Mixins can 
  hide lots of code, sometimes too much -> they can be hard to maintain. 
Making their use a bit more explicit shouldn't hurt in the long run.


> Should it also be illegal to use a mixin template as anything other than a 
> mixin? Tentatively, I'd say yes.

Agreed.


> I would actually go for this for both mixins and inner classes. I think it 
> would be preferable to be consistent with the use of the keyword;

I don't use inner classes so I can't tell how the people that do would 
feel, but it doesn't seem very bad.



-- 
Tomasz Stachowiak  /+ a.k.a. h3r3tic +/



More information about the Digitalmars-d mailing list