Re: Gtk2::Simple::Tree (preview)



On Thu, 2004-04-15 at 16:15, A. Pagaltzis wrote:
* Ross McFarland <rwmcfa1 neces com> [2004-04-15 20:41]:
yeah, but having 10 ways to do stuff isn't always a good idea.
(heh)

And sometimes it is. This class would be a pretty fundamental
thing, as data structures generally have this odd tendency :) to
be.

How many ways can think of to build a loop in Perl? How many to
write a guard statement? Sure, not all of them are used
constantly, but sometimes it's good to have the option.

Likewise I think an interface to something as fundamental as this
class should offer a lot of options.

I'd agree with Ross here, I don't think it's a good idea to be
maintaining too many ways to access the same info.  Pick a basic method,
if you want to build convenience functions on top of that, you have that
option (then you get to maintain it as well;)


my first thoughts are that the tied interface would actually be
just as fast if not faster

Tieing adds OO method lookup overhead *and* tie magic overhead on
top of that. It can never be as fast as something along the lines
of passing a path or an index list.

But you'd have to parse out the path, which is overhead itself. 
Besides, the tie'ing procedure might prebind the functions, so there
wouldn't be as much as you think.  It's debatable enough that I'd
reserve judgment until someone ran benchmarks.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]