Matrix, Array2D and SequenceableCollection

Daniel Joyce daniel.a.joyce at worldnet.att.net
Thu Dec 5 07:20:14 UTC 2002


On Wednesday 04 December 2002 09:40 pm, Brian T Rice wrote:

> I don't have suggestions about the implementation, but I do recommend
> using the name "Sequence" instead of "SubSequenceableCollection"
> since the latter denotes some kind of slice (as in "SubSequence").

Why not just have a message that returns a row/column as a normal 
sequencable collection of your choice?

Why the need for a super fancy sub-sub-sub sequencable collection? ( 
what happens when start considering 3D matrices, or 4d? <:) )

Just ask the Matrix how you want it sliced/diced?

Take this with a grain of salt, but...

Matrix row:3 would return the 3rd row of the matrix, etc, etc

Also, matrices and arrays are two different beasts. Sure, a matrice's 
data can be stored as a 2d array, but one is a handy storage format, 
and the other has all sorts of mathematical cruft.

Also, If we've gone to matrix, and throw away the lightweight 2D array, 
well, what happens when you ask Matrix to multiply itself by a 1D 
array? ( Array is a degenerate case of Matrix now, should it not be 
removed too? ).

What's needed is a general array class, that can construct a variety of 
n-dimensional arrays, and a PIE like system that allows one to graft on 
the math aspects/traits as needed... ;)

Nevermind the whole point with numbers being used to run loops....

Why do numbers need to know about looping? Is there some other way than 

1 to: 3 do: [ ]

We got numbers acting like loop constructs, and now arrays acting like 
mathematical objects....  Besides, building a 2D array is already easy, 
it's just a collection of collections. 

I don't think any of this makes sense from a well factored standpoint. 
Too many things doing what they shouldn't.

-Daniel





More information about the Squeak-dev mailing list