I should really check the source before replying. EmptyList does
indeed implement ISeq, so my argument doesn't hold.

Phil

On 3 September 2012 07:01, Philip Potter <[email protected]> wrote:
> The docs you quoted seem to answer your question.
>
> Not all lists are valid seqs. In particular, the empty list is a valid list
> but not a valid seq. So if the empty list implemented ISeq, it would be
> lying. If the empty list implements IPersistentList, then IPersistentList
> can't implement ISeq.
>
> Phil
>
> On Sep 3, 2012 12:44 AM, "Andrei Zhlobich" <[email protected]> wrote:
>>
>> Why IPersistentList doesn't extend ISeq?
>>
>> Clojure docs say:
>>  >> Lists are collections. They implement the ISeq interface directly
>> (except for the empty list, which is not a valid seq)
>>
>> At this moment EmptyList implements ISeq, but PersistentList doesn't. It
>> seems very strange for me.
>> Also PersistentQueue implements IPersistentList, but semantically it is
>> not a list.
>>
>> I think we can do 2 changes in hierarchy:
>> 1) extend IPersistentList from ISeq;
>> 2) extend PersistentQueue directly from IPersistentStack instead of
>> IPersistentList.
>>
>> Is it possible?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to [email protected]
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> [email protected]
>> 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 [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to