TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Arrays, What's the point? - Stack Overflow

15 pointsby joel_liuover 16 years ago

3 comments

patio11over 16 years ago
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.)<p>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.<p>(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.)
评论 #410238 未加载
评论 #410501 未加载
prestyover 16 years ago
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.<p>I mean, seriously?
评论 #410223 未加载
评论 #410384 未加载
ablover 16 years ago
there is also a berkeley CS class youtube video that goes into the differences between a linked list and an array:<p><a href="http://www.youtube.com/watch?v=Wp8oiO_CZZE" rel="nofollow">http://www.youtube.com/watch?v=Wp8oiO_CZZE</a><p>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
评论 #410453 未加载