On 1 July 2012 15:04, Vinzent <ru.vinz...@gmail.com> wrote: > Extend on nil, IIndexed and default (I realize that > it's currently impossible in cljs).
Actually it is possible and it is how things were originally implemented. The move to the current implementation happened as part of an effort to make things faster. There are also some semantic considerations involved, see below. In any case, user code shouldn't need to worry about this. I also wanted to note that whether it makes sense for IIndexed in particular to be automagically implemented for all ISeq implementations depends on whether it means "collection type which can usefully be thought of as having indices attached to items" or "indexed random access collection". I lean towards the latter interpretation. This is no argument against having a unifying protocol or mandating the former interpretation (perhaps with a name switch to IIndexable?) and introducing an IRandomAccess protocol, just a comment on my view of the current state of affairs. Cheers, Michał -- 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