For the cases currently implemented, the perf difference is negligible. I don't think there is anything wrong with a helper protocol, but I also don't think the cond-based approach is a problem, unless there are real use cases for making these open.
Pondering whether this should be a protocol was *certainly* worth doing: replace and replace-first were asymmetric in their arg handling, and the difference was a bug. I have updated the patch. Thanks! Stu > In perusing the patch for ticket #359 (promoting string), I came > across the following fn: > > http://gist.github.com/422392 > > I was wondering why there is a cond that dispatches on the instance? > predicate, instead of a helper protocol being used. Is a helper > protocol bad style? Is cond faster? Is it important that this be > closed? Did I simply read the patch wrong? > > Thanks, > Sean > > -- > 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 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