in reply to Re: Re: Help with ADT
in thread Help with ADT
If you're within an object and you're doing 2- and 3-deep lookups into $self, you're programming horribly. It's mean, but true.First of all, in the given example, we are not using objects. But that's not really relevant. However, if you consider 2 level deep lookups to be "horrible", then there's an awful lot of horrible code out there. Sometimes a 2 or 3 level deep lookup could be coded better. But dismissing any 2 or 3 level deep lookup as "horrible programming" is just stupid. That would mean you couldn't even access an entry in a two dimensional array without an intervening method lookup.
isn't in anyway harder to understand than$self -> {$feeble} {$fubble};
Except that the latter exposes the method feeble to the outside world and is less efficient.$self -> feeble ($feeble) -> fubble ($fubble);
Of course, non of your advise would have brought him a micron close to solving his problem. You still can't treat a reference to an array as a reference to a hash, or the other way around, regardless how deep you do your lookups.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Help with ADT
by dragonchild (Archbishop) on Jul 25, 2002 at 15:41 UTC | |
by Abigail-II (Bishop) on Jul 25, 2002 at 16:02 UTC | |
by dragonchild (Archbishop) on Jul 25, 2002 at 18:45 UTC | |
by Abigail-II (Bishop) on Jul 26, 2002 at 11:07 UTC | |
by dimmesdale (Friar) on Jul 26, 2002 at 12:16 UTC |