Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Need a test for deep equality

by willijar (Initiate)
on Apr 22, 2002 at 12:03 UTC ( [id://161035]=note: print w/replies, xml ) Need Help??


in reply to Need a test for deep equality

While there are many Perl functions that could do this I would recommend rolling your own specific to your application. It isn't really reinventing the wheel as every application and structure will probably require a different definition for equality. For example are two structures equal only if stored at the same location or if they contain the same data. WHat about when comparing the object contents. At what depth do yuo compare contents rather than identity. Similarly for vectors. In comparing Strings should they be case insensitive. etc. Can an integer be equal to a float with the same printed representation. It isn't a simple question with simple answers.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found