On Mon, Mar 02, 2009 at 10:09:00AM -0800, Eric Wilhelm wrote:
> # from Joshua ben Jore
> # on Monday 02 March 2009 08:20:
> >If you redesigned, replacing your hash with an array would be harder
> >to typo, faster, smaller, not as nice to dump with Dumper, and harder
> >for 3rd parties to extend.
> Is "harder to extend" a design goal?  You also make it harder to use.  
> And if everybody did it, you would have name clashes with all of those 
> constants.
> Using methods for typo protection doesn't get you compile-time checking, 
> but you have tests, right?

I should point out that my Tie::Hash::Vivify trick went into the code
only after my tests mysteriously failed and I'd spent ages trying to
figure out why.  No doubt the tie()ing adds some small overhead to the
released code, but I ain't taking it out because:
  * I believe the performance hit will be small;
  * it will make any future bug-fixes or enhancements less irritating
    for me to develop

and given that it's free software, reducing my irritation is far more
important than improving someone elses performance!  The whole module
it's in has been designed with the aim of being correct and maintainable
at the expense of being pitifully slow anyway.

[ insert muttering about #ifdef-ing it in or out depending on whether
  it's running on my machine or not - why on earth was that useful
  feature removed? ]

-- 
David Cantrell | Nth greatest programmer in the world

          All praise the Sun God
          For He is a Fun God
          Ra Ra Ra!

Reply via email to