Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Compare/Diff on nested data structures

by GrandFather (Saint)
on Mar 21, 2009 at 22:58 UTC ( [id://752306]=note: print w/replies, xml ) Need Help??


in reply to Compare/Diff on nested data structures

Actually, what you are really want is diff rather than compare, but it is a non-trivial problem.

I suspect that the reason you are having trouble finding anything is that the way differences are represented are likely to be highly application specific. While a pass/fail (compare) test is fairly unambiguous with a result that is easy to interpret, how are you going to represent the difference between two data structures? As a list of insertions/deletes to be performed on one that will result in the other? As a list of nodes that are present in one, but not the other? As two lists of missing nodes, one for each structure? Something else?


True laziness is hard work
  • Comment on Re: Compare/Diff on nested data structures

Replies are listed 'Best First'.
Re^2: Compare/Diff on nested data structures
by cosmicperl (Chaplain) on Mar 22, 2009 at 02:49 UTC
    Actually, what you are really want is diff rather than compare, but it is a non-trivial problem.
    That was implied in the title :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-06-23 02:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.