On 23.04.2010, at 17:49, ataggart wrote:

> One problem with requiring the "other" object to be of the same type
> is that it would break the current model, e.g.:
> 
> user=> (= '(1 2 3) [1 2 3])
> true

I'd want this only for defrecord, which is a more limited (but also more 
convenient) way to define types. For the more basic and general deftype, 
everything should be possible.

However, a perhaps better way to arrive at the same goal is to provide a macro 
that takes care of the type comparison.

> I'm left to wonder if it the more correct implementation of the
> desired behavior is not to override the equals, but rather to
> implement Comparable.

Comparable requires a fully defined order relation, if I remember correctly. 
And it's not used by the standard Clojure comparison operators.

Konrad.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to