Greg can correct me if I'm wrong, but I believe it's to allow us to
combine collections in ways that aren't possible in the JDK
collections, like:

class Foo implements Map<A, B>, Sequence<C>

If Sequence (and Dictionary) extended Iterable, this type of class
would be impossible.

-T

On Sun, Apr 12, 2009 at 10:14 AM, Noel Grandin <[email protected]> wrote:
> Hi
>
> I was quite surprised when I called a method on a widget that returns
> a sequence, and could not iterate over the Sequence<T>.
>
> Is there a reason that Sequence<T> does not extend Iterable<T> - it
> seems like most of the subclasses that implement Sequence do this
> anyhow, and it would certainly make using it more convenient.
>
> Regards, Noel Grandin.
>

Reply via email to