
Arrays, What's the point? - Stack Overflow - joel_liu
http://stackoverflow.com/questions/392397/arrays-whats-the-point
======
patio11
While that may seem like a silly question, if Java and Ruby both lost the data
structure entirely, my code would still function. (The frameworks it runs on,
not so much.)

It is sort of like a programmer not knowing what a NAND gate is. You could get
all crotchety about that, because he couldn't do a single thing without a NAND
gate on his current system... but he really doesn't need to know the
specifics. Many types of programming (not all, obviously) have abstracted away
memory management and have pitiful speed requirements compared to the capacity
of hardware (and the bottlenecks don't happen anywhere near application code),
and accordingly aside from syntactic inertia there is really not that much of
a reason to care about arrays any more than there is to know about your NAND
gates.

(Edit: It occurs to me that I could monkeypatch Array in Ruby and replace it
with an associative array and my site would probably function fine... Maybe
I'll try it just to prove a point.)

~~~
tgdavies
But if you turned all your ArrayLists into LinkedLists, what would happen to
the performance of your programs?

~~~
patio11
The 1 millisecond of application logic between the 150 millisecond roundtrip
to the database and 800 millisecond network latency would be 3 milliseconds?

------
presty
I'm worried that (according to his stackoverflow profile) a 'Long-time
Informix user and developer, experienced in C and Unix (many variants)' asks
such a question.

I mean, seriously?

~~~
parenthesis
As mentioned in the Reddit comments on this, a stackoverflow question can be
edited, and if it is, the most recent editor shows up in the bit you've looked
at. And that is this person, who isn't the original questioner.

------
abl
there is also a berkeley CS class youtube video that goes into the differences
between a linked list and an array:

<http://www.youtube.com/watch?v=Wp8oiO_CZZE>

it is a good intro to the subject, however, Shewchuk does not thoroughly
explain the difference beetween lookup/ access time and search time for arrays
and linked lists. I like the explanation given by the commenter on
stackoverflow

~~~
jcbozonier
I would find it very odd if this guy didn't know what an array was but did
know what a linked list is.

I'm guessing (since I've been there myself at one point) that he thinks a list
is just some list in memory and he doesn't understand the internal
representation of any of the structures at all.

