Uploaded image for project: 'Clojure'
  1. CLJ-1375

Remove Util.pcequiv() and stop pretending Java colls are equiv to Clojure colls

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: Release 1.5
    • Fix versions: None
    • Labels:
    • Patch:
      Code

      Description

      The Util.pcequiv() method

      static public boolean pcequiv(Object k1, Object k2){
      	if(k1 instanceof IPersistentCollection)
      		return ((IPersistentCollection)k1).equiv(k2);
      	return ((IPersistentCollection)k2).equiv(k1);
      }
      

      tries to get equiv semantics (cross-class number equality) for cases of mixed Clojure/Java collection comparison. However, this is not a sustainable direction and we would like to stop doing this.

      Attached patch removes this and changes calling code to only call equiv when both collections are IPersistentCollection.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alexmiller Alex Miller
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: