[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: various comments

Radey Shouman writes:

> That is not the situation that I had in mind.

Ok, I just cut my text and try again. You don't want vectors and
arrays disjoint. I was thinking of the implementation types, which is
a separate issue.

> In SCM, for example, all vectors are arrays, but some arrays are not
> vectors, in particular, of course, multidimensional arrays are not
> vectors.

What about zero-based one-dimensional arrays that share some other
array? They cannot be simply R5RS vectors, but they might be the only
case that cannot. That's alright.

Another question. Vector elements are currently guaranteed to belong
to only one vector. That property would be lost. Perhaps that is not
so important?

Can we leave strings out of this?


> The only cost is that disjointness cannot be guaranteed between
> arrays and vectors -- and I'm not sure why it is even particularly
> desireable.

I'm not sure either.


>> there could be another abstraction layer on top of strings, vectors
>> and arrays, one that would just pay for the dispatching?
> On the other hand, until R4RS there was no formal requirement that,
> for example, lists and vectors were disjoint.

It's a good thing that they added that, but arrays really are a
generalisation on vectors, so they need not be disjoint.

Testing: would we be in trouble if vectors were arrays and we wanted
to generalise vectors another way, to make them able to shrink and
grow? It seems to me that those could be disjoint from vectors. No
problem for arrays there.

> You seem to be arguing against a generic sequence type, which I do
> not propose.

Er, no, I was not arguing against it. I won't argue for it either.