What are the pros and cons of an Inside-Out Object Model?
- Encapsulation of attributes: only the scope that defines the attributes can get at them.
- Inheritance always works: the implementation isn't dependent on how a super class is implemented.
- Multiple inheritance is potentially easier.
- It's more complex, you need for instance a DESTROY function.
- By default, they don't work after splitting of threads, unless you set up a special CLONE method. (They should work fine if you only create objects after you've split up your threads).
- Due to the encapsulation, you will need to do extra work when serializing.
- There's far less documentation. "Everyone" still gets to learn hash based objects when learning OOP in Perl.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||