|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> Oh! OK. Heh. I don't think I've ever had the pleasure of needing or using
>> inner classes before, in any language, so it didn't leap out at me.
>
> Why not?
I just haven't needed it. In languages where there's specific header files
(i.e., C and C++), I don't include the header file for the child class. In
languages where there's specific support for the concept (C#) I use the
internal visibility. I haven't done much in Java since they invented inner
classes, but those aren't really "invisible" so much as obsfucated anyway,
so there didn't seem to be a benefit there either.
I.e., everyone already has modular visibility controls, so putting it inside
a class rather than a namespace didn't seem worthwhile.
> It aids in limiting the visibility of types, and thus increases
> modularity. If a class uses a helper class which is completely exclusive
> to that class (and might even be a friend), then it makes sense that the
> helper class is defined as a private inner class.
Yes it does. I didn't say it was bad. I just said I never found the need to
use one. The existent mechanisms were already sufficient.
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
 |