Re: Unpredictable behavior of Protocol Extension

2011-02-28 Thread Chas Emerick
On Feb 28, 2011, at 12:33 PM, Ken Wesson wrote: > As noted earlier in this thread, I have determined that simply making > supers return a sorted set with an appropriate comparator (e.g. > alphabetic) suffices in this regard. (For performance reasons, supers, > or the instance of supers used by pr

Re: Unpredictable behavior of Protocol Extension

2011-02-28 Thread Ken Wesson
On Mon, Feb 28, 2011 at 11:30 AM, Chris Perkins wrote: > On Feb 28, 10:49 am, Rich Hickey wrote: >> On Feb 28, 2011, at 8:32 AM, Chas Emerick wrote: >> >> > I agree with your sentiment.  This has been discussed before here: >> >> >http://groups.google.com/group/clojure-dev/browse_frm/thread/fb3a0

Re: Unpredictable behavior of Protocol Extension

2011-02-28 Thread Chris Perkins
On Feb 28, 10:49 am, Rich Hickey wrote: > On Feb 28, 2011, at 8:32 AM, Chas Emerick wrote: > > > I agree with your sentiment.  This has been discussed before here: > > >http://groups.google.com/group/clojure-dev/browse_frm/thread/fb3a0b03... > > > That discussion pretty quickly wandered into the w

Re: Unpredictable behavior of Protocol Extension

2011-02-28 Thread Rich Hickey
On Feb 28, 2011, at 8:32 AM, Chas Emerick wrote: I agree with your sentiment. This has been discussed before here: http://groups.google.com/group/clojure-dev/browse_frm/thread/fb3a0b03bf3ef8ca That discussion pretty quickly wandered into the weeds of whether this sort of usage of protocols

Re: Unpredictable behavior of Protocol Extension

2011-02-28 Thread Ken Wesson
On Mon, Feb 28, 2011 at 8:32 AM, Chas Emerick wrote: > I agree with your sentiment.  This has been discussed before here: > > http://groups.google.com/group/clojure-dev/browse_frm/thread/fb3a0b03bf3ef8ca > > That discussion pretty quickly wandered into the weeds of whether this sort > of usage of

Re: Unpredictable behavior of Protocol Extension

2011-02-28 Thread Chas Emerick
I agree with your sentiment. This has been discussed before here: http://groups.google.com/group/clojure-dev/browse_frm/thread/fb3a0b03bf3ef8ca That discussion pretty quickly wandered into the weeds of whether this sort of usage of protocols was intended or not, fundamentally programmer error o

Unpredictable behavior of Protocol Extension

2011-02-28 Thread Chris Perkins
I am wondering whether this is a known issue. I made the mistake of extending a protocol to two interfaces, and then calling it with an object that implements both. (defprotocol Foo (foo [x])) (extend-protocol Foo clojure.lang.Sequential (foo [x] "sequential") clojure.lang.Associative