Details
-
Type:
Enhancement
-
Status:
Closed
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.3
-
Component/s: None
-
Labels:None
-
Approval:Ok
Description
I constantly find myself writing ad hoc code to compare bits of structure, either at the REPL or in tests. (Or even worse, trying to eyeball two long pprint outputs).
What I want instead is a diff function that compares two structures a and b, returning the parts only in a, parts only in b, and parts in both. Good solution for my needs should:
- work with all kinds of collections (both Clojure and Java)
- make simple choices about how to define a "difference"
- need not worry too much about perf
Converted from http://www.assembla.com/spaces/clojure/tickets/448
Attachments:
0448-structural-diff.patch - https://www.assembla.com/spaces/clojure/documents/dr3uxCZj4r36h-eJe5cbLr/download/dr3uxCZj4r36h-eJe5cbLr
0448-structural-diff-mm.patch - https://www.assembla.com/spaces/clojure/documents/dXJg-aZlyr35yieJe5cbCb/download/dXJg-aZlyr35yieJe5cbCb
0448-structural-diff-no-mms.patch - https://www.assembla.com/spaces/clojure/documents/bkIb2GZnOr363HeJe5cbLr/download/bkIb2GZnOr363HeJe5cbLr
0448-data-diff.patch - https://www.assembla.com/spaces/clojure/documents/dhs7kcZ88r34I5eJe5cbCb/download/dhs7kcZ88r34I5eJe5cbCb
0448-data-diff-privatized.patch - https://www.assembla.com/spaces/clojure/documents/b7-JX21Hur36gceJe5cbCb/download/b7-JX21Hur36gceJe5cbCb
0448-data-diff-nil-atom.patch - https://www.assembla.com/spaces/clojure/documents/aoWwgo1Iqr36gceJe5cbCb/download/aoWwgo1Iqr36gceJe5cbCb