Lack of `outer` keyword makes inner class dup implossible

Jarrett Billingsley kb3ctd2 at yahoo.com
Fri Jul 14 20:37:11 PDT 2006


"Derek Parnell" <derek at psych.ward> wrote in message 
news:op.tcpklel16b8z09 at ginger.vic.bigpond.net.au...

> Excuse my ignorance, but what does an inner class provide that other 
> alternatives can't?

Well, what does a nested function provide that a separate, external function 
doesn't?

- Encapsulation
- Access to outer variables
- Is a Cool Thing (TM) ;)

Pretty much the same thing applies to inner classes, although I'll grant 
you, I don't use inner classes as much as nested functions. 





More information about the Digitalmars-d mailing list