in reply to bless + tie

Even if they're autogenerated, [getter and setter methods] still suck because we can't interpolate them inside a string.

Can you expand on why this is a problem for you? In particular, why do you find code like

"foo's bar is " . $foo->getBar() . "!"
to be a problem worth throwing tied variables at?

Replies are listed 'Best First'.
A principle
by cbraga (Pilgrim) on Oct 01, 2003 at 06:17 UTC
    First, it's more trouble to type and I also think its ugly as hell. Heck, if I liked that sort of code I'd be programming in VBScript.
      First, it's more trouble to type and I also think its ugly as hell.

      So to save a few keystrokes and indulge your aesthetic sense, you're prepared to use tied variables? I rather think that, on balance, you're losing ground.

        My opinion is that a little effort with tied variables can save a lot more effort when typing, thus leaving me with a net positive. I think I'm being Lazy here.