From: RG on
This is a meme that needs to be nipped in the bud:

In article <8bgijdF9jgU1(a)mid.individual.net>,
Pascal Costanza <pc(a)p-cos.net> wrote:

> In general, I'm
> quite skeptical about abstracted interfaces for different kinds of
> collections: Each of them has their own advantages and disadvantages,
> and you don't easily change from one to the other without considering
> performance and other implications. So what's the real use of an
> abstract interface, other that you _can_ abstract it?

....

> I don't want to discourage you, but again, what's the real use of such
> abstractions?

To make it easier to change implementations if the assumptions that led
you initially to choose a particular one turn out to be wrong. Which
happens a lot.

Why do you doubt the value of this?

rg
From: Alessio Stalla on
On 30 Lug, 22:53, RG <rNOSPA...(a)flownet.com> wrote:
> This is a meme that needs to be nipped in the bud:
>
> In article <8bgijdF9j...(a)mid.individual.net>,
>  Pascal Costanza <p...(a)p-cos.net> wrote:
>
> > In general, I'm
> > quite skeptical about abstracted interfaces for different kinds of
> > collections: Each of them has their own advantages and disadvantages,
> > and you don't easily change from one to the other without considering
> > performance and other implications. So what's the real use of an
> > abstract interface, other that you _can_ abstract it?
>
> ...
>
> > I don't want to discourage you, but again, what's the real use of such
> > abstractions?
>
> To make it easier to change implementations if the assumptions that led
> you initially to choose a particular one turn out to be wrong.  Which
> happens a lot.
>
> Why do you doubt the value of this?

I agree with rg. Sure, cons for vectors doesn't make much sense.
Still, having a common set of operators which is guaranteed to work
across all sequences makes it easier to use different sequence
implementations seamlessly. If you notice that you used a list where a
vector would have been more appropriate, you have the chance to use a
vector without changing the client code. Maybe efficiency concerns
will make you change it anyway, but that's not necessary in general.

Alessio

> rg