On Jul 29, 11:51 pm, Ryan Twitchell metatheo...@gmail.com wrote:
Hi all,
I noticed (with a very recent git pull) the following asymmetric
behavior regarding = and records:
(defrecord my-record [a])
(def r (new my-record 1))
(def s (new my-record 1))
(= r s) ;; true
(= s r)
I'm sure it's not intentional, but it makes sense. In the first case, the
comparison delegates to `r`'s equals() method, which would return false because
{:a 1} isn't a `my-record`. In the second case, the comparison delegates to
`{:a 1}`'s equals() method, which is a PersistentArrayMap, which
On Fri, Jul 30, 2010 at 4:51 AM, Ryan Twitchell metatheo...@gmail.com wrote:
(= r s) ;; true
(= s r) ;; true
(= r {:a 1}) ;; false
(= {:a 1} r) ;; true
Is this intentional? (I hope not)
The three first are documented in (doc defrecord)
In addition, defrecord will define
Hi all,
I noticed (with a very recent git pull) the following asymmetric
behavior regarding = and records:
(defrecord my-record [a])
(def r (new my-record 1))
(def s (new my-record 1))
(= r s);; true
(= s r);; true
(= r {:a 1}) ;; false
(= {:a 1} r) ;; true
Is this