Records are (intentionally) map-like structures that are compared with value equality, just like maps. This will not change.
If you want custom equality, use deftype. Also see http://clojure.org/datatypes for more info. On Sunday, October 11, 2015 at 9:24:54 PM UTC-5, Ricardo Mayerhofer wrote: > > I found this topic when Googling about the subject. I'm facing the same > issue here. Any update since the original post? > > It would be really great if it were possible to override equals in > defrecord. > > Em quarta-feira, 11 de fevereiro de 2015 11:49:11 UTC-2, Michael Sperber > escreveu: >> >> I'm implementing some low-level data structures using arrays, and >> I'd like to use defrecord to make type for them. >> >> I need to override equals & hashCode, but defrecord won't let me do it. >> I know this has been discussed before: >> >> https://groups.google.com/forum/#!topic/clojure/Nvz0WDhj0qk >> >> The advice there is to use deftype, but this would mean copying a large >> amount of boilerplate which includes references to internal Clojure >> interfaces. So I'd like to avoid that. >> >> Couldn't defrecord check whether I'm overriding any of the interfaces it >> can implement and then not to do it? >> >> Cheers, >> Mike >> > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.