Clojure

Documentation for "=" is misleading

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.5
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    linux 2.6.32-431.el6.x86_64

Description

Document for clojure.core/= says it compares numbers in a type-independent manner. In reality the comparission is made in a type dependent manner. If the above statement was true then (= 1 1.0) would eval to true not false;

clojure.core/=
([x] [x y] [x y & more])
Equality. Returns true if x equals y, false if not. Same as
Java x.equals except it also works for nil, and compares
numbers and collections in a type-independent manner. Clojure's immutable data
structures define equals() (and thus =) as a value, not an identity,
comparison.

Activity

Alex Miller made changes -
Field Original Value New Value
Labels document docs
Alex Miller made changes -
Issue Type Task [ 3 ] Enhancement [ 4 ]

People

  • Assignee:
    Unassigned
    Reporter:
    George
Vote (0)
Watch (3)

Dates

  • Created:
    Updated: