Talk:Array (data structure): Difference between revisions

Content deleted Content added
Discussion: the difference is not an "implementation detail": one is a virtual concept, the other is an implementation technique.
Line 238:
:''Any additional comments:''
::I say, '''merge''' the articles. Whether you call them types or structures is an implementation detail that varies from language to language. Plenty to be said besides that; whether arrays are treated as a primitive or compound by syntax is not an important enough distinction to merit two different articles. -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 06:39, 21 May 2009 (UTC)
:::But the point is that "data structure" is a concept that could (and has been) defined and discussed without ever referring to "programming language", "syntax", or "type system"; whereas "data type" is a concept that exists only in the so-caled "higher programming languages" and cannot be discussed independently of them. This distinction is clear, for example, in Knuth's [[The Art of Computer Programming]], which is still a basic reference in the field, and in Paul E. Black's [http://www.itl.nist.gov/div897/sqg/dads/HTML/datastructur.html NIST Dictionary of Algorithms and Data Structures] (which does not even have an entry for "type"). Data types are abstractions that those languages provide so that programmers can handle memory words and (concrete) data structures with safety and convenience — much as those languages substitute abstract "commands" for "CPU instructions". And "abstract data type" (or "abstract data structure") is an even more abstract thing — a ''mathematical'' concept (like a [[group (mathematics)|group]] or [[graph theory|graph]]) that can be used to model both data structures and data types. Sure, often programmers use "data type" and "data structure" interchangeably, to mean any of those three terms, much as one may say "a wine bottle" when one actually means "a wine bottle full of wine", or describe [[sake]] as "rice wine". Merging [[array data type]] and [[array data structure]] (or [[data type]] and [[data structure]]) is as appropriate as merging [[wine]] and [[wine bottle]]. As the old philosphers would say:
:::::''When I use my finger to point at the Moon, no one would mistake my finger for the Moon. But why is it then, that when I use a word to point to an idea, people so often mistake the word for the idea?'' -- attributed to [[Zhuangzi]], c. 350 BC.
:::All the best, --[[User:Jorge Stolfi|Jorge Stolfi]] ([[User talk:Jorge Stolfi|talk]]) 19:57, 21 May 2009 (UTC)
 
==Array structure?==