Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: Better Inside-Out Objects :)

by xdg (Monsignor)
on Oct 07, 2006 at 12:00 UTC ( #576826=note: print w/replies, xml ) Need Help??

in reply to Re: Better Inside-Out Objects :)
in thread Better Inside-Out Objects :)

One of the big things you gain is orthogonal property storage and "black box" inheritance. With inside-out objects, you can subclass any other class regardless of the type of blessed reference (even if it changes in the future). In addition, you can freely add a private "_foo" property without regard for whether any super or subclass might now or in the future have a "_foo" property. This is a benefit if you (or your team) doesn't necessarily control every class in the class hierarchy. E.g. CPAN. This flexibility has substantial value for some people.

(Of course, some implementations of inside-out objects choose to make this difficult in order to provide other features.)

For more on the pros and cons of inside-out objects, see my YAPC::NA presentation: Eversion 101. I think it's a fairly balanced perspective on what people get and what the complexity is.

I'm not an advocate, but I do think there's a lot of misinformation out there.


Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://576826]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2019-08-21 04:35 GMT
Find Nodes?
    Voting Booth?

    No recent polls found