After being party to some pain and suffering over at Heaps
I was reminded of Perl's striking lack of data structures beyond the
basic arrays, hashes, and scalars. Sure, it has modules for
everything from databases
, and makes it
easy to glue these different domains together in interesting ways.
But in terms of bread-and-butter, straight-from-CLR data structures, I
think it could be better.
If I were working in C++, I could get these basic building blocks
from the STL, LEDA, Boost, etc. Such standard implementations are
well-designed, efficient, and well-tested; they let programmers solve
problems once and for all, then move on to better things. While a few
applications demand more than the standards can provide, and more than
a few programmers prefer their own, uneven wheels, most people who
want to get the job done quickly and correctly have the tools to do so.
Now consider our Heap. I believe POE has
implemented its own priority queues, and List::Priority just
hit the shelves last month. None of these is fast enough, general
enough, and/or easy enough to use, so each will remain confined to its
own niche. Each has its strengths and weaknesses, but I wouldn't be
surprised if a good standard implementation could beat them all.
Perl needs a good, tested library of containers and algorithms, all
living in a well-known place. There are some gems out there on CPAN
now, and probably some more sitting in people's home directories. We
need to put them in a common place, test them, tune them, and get them
in the standard distribution.