Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Don't use a subclass of HashMap. Write a class that implements Map, and keep a HashMap internally. That'll be much more flexible.
    • It's a little late. :)

      But really, I don't see how I'm more flexible for implementing Map than simply subclassing HashMap. That just seems like a lot of trouble writing delegates methods that would otherwise just be there if I subclass. It's probably because Perl is the screwdriver with which I attempt to hammer every nail, and the Perl version of hashes as one of the three fundamental data structures is indelibly marked on my mind.

      I suppose it makes things easier if ever I want to use some other structure to store the data, but I can't imagine anything better than a hash for storing data. :) This is most likely a limitation on my perspective, but I don't see it. :)

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers