NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
I don't get it (Score:1)
Re: (Score:2)
It's a question of encapsulation. Imagine that the Salesman class no longer has need of a manager accessor, but you still need to know which office the salesman is with. You might get a office method pushed into the Salesman class. Then, every place where you have the above code needs to be changed to:
If that's called a lot, it can be a maintenance nightmare.
However, what if you have this?
Re: (Score:1)
Re:I don't get it (Score:2)
You're welcome. It's not exactly intuitive. Took me a couple of tries to get it :)
Reply to This
Parent