in reply to Re^4: Re-blessing || Re-constructing objects
in thread Re-blessing || Re-constructing objects

It can't be done without breaking encapsulation. All of your examples require a class to know all about the internals of some other class. You may decide that's okay in your case, but it still loses the abstraction.
  • Comment on Re^5: Re-blessing || Re-constructing objects

Replies are listed 'Best First'.
Re^6: Re-blessing || Re-constructing objects
by demerphq (Chancellor) on Apr 18, 2006 at 21:30 UTC

    Just out of curiousity do you consider "friend" classes to violate encapsulation?

    ---
    $world=~s/war/peace/g

Re^6: Re-blessing || Re-constructing objects
by salva (Canon) on Apr 18, 2006 at 19:03 UTC
    No. In my sample code there is only one class.
      Putting them all in one file doesn't make them one class.
        you can break it in 50 files and it will continue to be an only class