On Fri, Jul 8, 2011 at 1:06 AM, David Nolen <dnolen.li...@gmail.com> wrote:
> On Fri, Jul 8, 2011 at 1:00 AM, Ken Wesson <kwess...@gmail.com> wrote:
>>
>> > On Thu, Jul 7, 2011 at 11:21 PM, Ken Wesson <kwess...@gmail.com> wrote:
>> >> ... it won't use the protocol to cache the result. Making it do so,
>> >> however,
>> >> would cause problems if one had (seqable? some-foo) and later attempted
>> >> to extend the protocol to mark Foos as seqable within the same runtime
>> >> session.
>
> Problem for who? Problem how? Extending seqable? to types you do not control
> or which are not seqable? as defined by Clojure itself is asking for trouble
> anyhow.

If you extend it further at all, it could happen that it gets called
on a non-array object of a type before being extended to that type,
though this is much more likely at a REPL than in deployment at least.
On the other hand if you won't ever extend it further at all there's
no real advantage over a non-protocol solution, like the monolithic
(or ...)-bodied function punting to a memoized is-array-class?
function to check for the array case.

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

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