News for hackers. Stuff that matters.
Re:Arrays considered somewhat harmful by warmfuzzykitten on Monday January 24, 2011 @05:24PM (#2137032)
> Arrays simply do not model any problem that I have at all well

Then don't use arrays. However, arrays (vectors and matrices) do model problems that scientists and engineers have, and nothing else models them as well or efficiently. So to call arrays harmful is to exclude a large and important class of applications simply because you don't happen to work on them. It would be more reasonable to note there is a need for immutable arrays not met by our current languages.

Re:Arrays considered somewhat harmful by jbri on Monday January 24, 2011 @10:27PM (#2137846)
Is it an array that models your problem efficiently, or is it "an n-dimensional data structure with O(1) lookups by index", of which an array is merely one implementation?
Re:Arrays considered somewhat harmful by chancho on Monday January 24, 2011 @11:46PM (#2138026)
Are there any other such data structures besides arrays and hash tables? (That's only half-rhetorical. I'd love to hear about one.) If so, are you seriously suggesting that when an array fits the bill, we should stop and think "hmm... maybe another data structure would be a better container for this dense, contiguous set of integer keys"?