Re: Overwrite equals in defrecord

2013-10-25 Thread Andrii V. Mishkovskyi
On Fri, Oct 25, 2013 at 4:41 PM, Marc Dzaebel wrote: > However, if you need the multiple features of records, you would need to > have the generated code of defrecord in order to reimplement records with > deftype. Is there something available? Hey Marc, I've recently been using this little li

Re: Overwrite equals in defrecord

2013-10-25 Thread Marc Dzaebel
>> use deftype which is more low-level and I think doesn't define equals or put y in meta data that don't participate in equality...:) Hi Jim, this works! However, if you need the multiple features of records, you would need to have the generated code of defrecord in order to reimplement recor

Re: Overwrite equals in defrecord

2013-10-22 Thread Jim - FooBar();
use deftype which is more low-level and I think doesn't define equals or put y in meta data that don't participate in equality...:) Jim On 22/10/13 22:44, Marc Dzaebel wrote: http://cmayes.wikispaces.com/PracticalClojure13: ... defrecord does not support Java class inheritance, so it can

Re: Overwrite equals in defrecord

2013-10-22 Thread Marc Dzaebel
http://cmayes.wikispaces.com/PracticalClojure13: ... > defrecord does not support Java class inheritance, so it cannot override > methods of Java classes, even abstract classes. However, it does permit you > to override methods of java.lang.Object such as hashCode, equals, and > toString. Simpl

Overwrite equals in defrecord

2013-10-22 Thread Marc Dzaebel
(defrecord R [x y]) automatically defines a reasonable *equals* method using x & y. However, is it possible to overwrite the method as it should use X only? My tries resulted in *"Duplicate method name&signature in class ...". Do I have to use extend-type?* -- -- You received this message bec