First, IPersistentSeq is the interface, PersistentSeq is the actual class.

If you look at it a little more closely, PersistentList extends ASeq, which
is an abstract class. ASeq implements the ISeq interface. So PersistentList
does implement ISeq through its parent class.

https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentList.java#L16
<-
PersistentList extending ASeq
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/ASeq.java#L16
<-
ASeq implementing ISeq


On Fri, Aug 31, 2012 at 12:58 PM, Andrei Zhlobich <a.zhlob...@gmail.com>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 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

Reply via email to