Dave Thomas <Dave / PragmaticProgrammer.com> wrote:
>
>Kevin Smith <sent / qualitycode.com> writes:

(talking about private classes for objects, and their uses)
[...]
>Sometimes it's simply a notational convenience. Othertimes, you
>genuinely need to be able to add features to objects.[...]
>
>I have to admit I use this rarely, but it's always a nice solution to
>have in your back pocket.

I actually tried putting this in my back pocket a while
ago, and failed.

Can someone give me an example of how you would write a
method that extends an object and gives it a new method?
(I kept on seeing "nested method definition" warnings
when I tried it the naive way.)

Thanks,
Ben
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com