in reply to Encapsulation without methods

Tying a blessed object ... you get all the loss in speed for method lookup and all the loss in speed for access. Plus, it ends up being a nightmare to maintain. In my personal tests, which were highly unscientific, I ended up losing about 50% of my speed when I ended up tying my objects. Now, speed isn't everything, but 50% is a lot in my book, for a potentially negative gain in maintainability, all for what seems to be cool factor.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

Replies are listed 'Best First'.
Re^2: Encapsulation without methods
by Roy Johnson (Monsignor) on Jun 22, 2004 at 03:41 UTC
    One of us is unclear on what the other is saying. I'm not sure which. I'm not tying my object, I'm including a tied scalar as a member of a hash (object). Behind the scenes, the scalar is an object (as is any tied variable), and calls methods for STORE and FETCH, which I would expect to be very comparable to SET and GET.

    We're not really tightening our belts, it just feels that way because we're getting fatter.