in reply to Generic object in inside-out classes
That's an interesting technique -- I'm definitely adding it to my notes for the next time I give my inside-out objects talk.
One negative that I see is that it adds even more overhead to every property access -- instead of id being an alias to refaddr, this approach has a second function call and a comparison.
That means I'd never want to implement this unless it was really necessary. I certainly wouldn't use it for convenience to specify initializing values -- that's a high runtime cost for a one-time activity.
-xdg
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Generic object in inside-out classes
by Anno (Deacon) on Feb 11, 2007 at 13:57 UTC |