I completely disagree.  If arbitrary load order were sufficient, there
wouldn't be (prefer-method).  (And CL wouldn't have a complex
heuristic for ordering.)  In reality, you may be extending someone
else's library by calling (defmethod) on their (defmulti).  And you
could be using someone else's library that defines their own
(defmethod)'s.  You can't group stuff that's not yours.

That being said, replacing an earlier method of the same priority
falls in the same trap.  It's dependent on load order, just in a way
that has less potential for conflict because the footprint is smaller.

I don't have an answer.  To a certain extent, I question the
usefulness.  Dispatching belongs on the dispatching function, and I
can't think of an example of range dispatching where the programmer
doing the dispatching isn't also writing the method that is dispatched
to (rendering my entire objection moot).  They're certainly tightly
coupled in a way that regular multimethods are not.

Thanks,
Alyssa

On Dec 23, 1:37 pm, Jay Fields <j...@jayfields.com> wrote:
> 2010/12/23 Ken Wesson <kwess...@gmail.com>
>
> > It most certainly is not.
>
> Yes, it is.
>
> > Unlike cond clauses, methods might be
> > scattered in different parts of a large code base
>
> _might_ be. But they don't need to be. I'd rather group my methods, know
> what I'm doing, and have to configure less. Anything that requires
> additional and unnecessary configuration is less desirable to me.
>
> And of course my code added a couple of other nice features as well.
>
>
>
> That's not really relevant, is it?
>
> My point was, and is, there's no reason to call anyone's code sucky.
> Especially when there's no "correct" answer.

-- 
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