in reply to Do you consider these different or the same?

This question is a bit philosophical... (Are you the same person you were 10 years ago? 10 months ago? 10 minutes ago?) I suppose that one could get at it via "majority rule", but I think the more fruitful approach is the one used by (for example) Scheme, which recognizes several levels of equality. (For Scheme these are, in increasing degree of stringency: equal?, eqv?, and eq?.) This approach recognizes the fact that different tasks demand different criteria for equality, instead of trying to shoehorn every situation into a single criterion for equality.

the lowliest monk

  • Comment on Re: Do you consider these different or the same?

Replies are listed 'Best First'.
Re^2: Do you consider these different or the same?
by demerphq (Chancellor) on Jul 01, 2005 at 12:33 UTC

    Actually in the bigger picture im arguing for exactly such a distinction. I beleive Test::More should supply a "looks_like()" function which wouldn't give a toss about reference counts and that the subroutine called is_deeply() should do what its name suggests and do a deep structural comparison (ie care about reference counts). Especially as I know that the code base currently handling is_deeply() can be relatively trivially be extended to support both behaviours.

    ---
    $world=~s/war/peace/g