Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: List::Compare

by davorg (Chancellor)
on Mar 25, 2004 at 19:49 UTC ( [id://339860]=note: print w/replies, xml ) Need Help??


in reply to List::Compare

My only complaint about List::Compare is the name. It doesn't compare lists, it compares arrays. Enought people confuse arrays and lists without this module adding to the problem. Maybe I should add the same functionality to Array::Compare.
--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re: Re: List::Compare
by McMahon (Chaplain) on Mar 25, 2004 at 20:00 UTC
    Yah, that's why I said "accidentally stumbled across..." I was searching on terms like "diff", "file", etc. Even searching on "list compare" shows List::Compare 7 items down the page.

    Which is why I thought a review might help-- the module's a little misnamed, and it's hard to find, but it works really well, and has pointers to lots of other modules that do similar things and that are probably also hard to find.
Re^2: List::Compare
by jkeenan1 (Deacon) on Jun 04, 2004 at 14:23 UTC
    This point was raised two years ago when I first distributed the module via CPAN. My feeling then was that the fact that the lists being compared were real-world data sets (I can hear my boss saying, "Get me a list of ...") was more relevant to its naming than the fact that the lists were placed into arrays before being passed to the constructor.

    I think the point is less valid today, because now the lists do not necessarily be in the form of arrays before being passed to the constructor (or passed to function in List::Compare::Functional). Now, you can pass seen-hashes to the constructor or function -- seen-hashes which imply the existence of underlying lists. See the documentation on seen-hashes

    Dave, I looked at Array::Compare when preparing the documentation. It seems to me that your approach is more tightly focused on comparing Perl arrays and takes a different approach to determining 'sameness' than does List::Compare. The two modules are tackling different problems.

      My feeling then was that the fact that the lists being compared were real-world data sets (I can hear my boss saying, "Get me a list of ...") was more relevant to its naming than the fact that the lists were placed into arrays before being passed to the constructor.

      Guess we'll just have to agree to disagree on that then. I spend a lot of time helping out on Perl beginners' forums and one of the most common errors I see is the confusion between lists and arrays. Having that confusion backed up in the name of a CPAN module doesn't really help matters.

      I'm seriously considering deprecating Array::Compare in favour of Data::Compare. If I do, would you like to take over Array::Compare so you can use the name for your module?

      --
      <http://www.dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

        It was only today that I saw that many moons ago davorg wrote:

        I spend a lot of time helping out on Perl beginners' forums and one of the most common errors I see is the confusion between lists and arrays. Having that confusion backed up in the name of a CPAN module doesn't really help matters.

        I concede the point. In hindsight, I probably should have called it Set::Compare (which apparently is still unspoken for!). That name could have encompassed comparisons of arrays and comparison of seen-hashes, both of which List::Compare can do.

        But people are using List::Compare in production, so I think changing the name would only add to the confusion. (I have changed the names of other CPAN modules in response to feedback from other Perl hackers, so I'm not just being persnickety.)

        What I can do is, since I've now got a mailing list for List-Compare, to add this as an FAQ.

        Jim Keenan

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://339860]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-25 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found