Talk:Array (data structure): Difference between revisions

Content deleted Content added
clarity: new section
 
(18 intermediate revisions by 16 users not shown)
Line 1:
{{Talk header}}
{{WikiProject Computer science|importance=Top|class=C}}
{{WikiProject banner shell|class=C|vital=yes|
{{WikiProject Computer science|importance=Top|class=C}}
}}
{{Copied |from=Index (computer science) |from_oldid=470513254 |to=Array data structure |to_diff=470647949 |to_oldid=470644178 |date=17:50, 10 January 2012}}
 
Line 11 ⟶ 14:
 
== 'of a specific data type' ==
"In computer programming, a group of homogeneous elements of a specific data type is known as an array, one of the simplest data structures" is false for Ruby; "Ruby's arrays can accomodate diverse object types". -[http://www.rubyist.net/~slagell/ruby/arrays.html Ruby User's Guide]
 
Is the definition of arrays inaccurate, or are Ruby arrays not strictly arrays?
--[[User:Wootery|Wootery]] 20:44, 3 October 2006 (UTC)
 
:"Array" is one of those slippery terms. The usual definition is from C terminology, where, of course, arrays ''are'' always homogenous. As far as I know, 'array' originaly was more or less synonymous with 'list' in the computer science literature to mean a collection of things ordered by index. I'm not sure where computer science comes down on this issue today. --[[User:Apantomimehorse|Apantomimehorse]] 04:59, 10 October 2006 (UTC)
 
:Ruby's arrays can be seen as arrays of variant types. The homogenity of type is not quite as essential as the uniformity of element size, which is necessary for ordinary address computation. It appears someone has added this in addition to the existing wording, which says "usually" and is now redundant. Argh. [[User:Deco|Deco]] 09:39, 10 October 2006 (UTC)
Line 196 ⟶ 200:
 
: Do you have a good example? [[User:Rgrig|Rgrig]] ([[User talk:Rgrig|talk]]) 01:24, 24 April 2009 (UTC)
 
:: For example, some kinds of [[hash table]] often reduces a number to the appropriate range of array index (the range varies over time with dynamic resizing) with a ''mod'' operator. --[[User:DavidCary|DavidCary]] ([[User talk:DavidCary|talk]]) 08:32, 23 January 2021 (UTC)
 
== Proposal to split the article ==
Line 248 ⟶ 254:
:::::''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)
:''The above discussion is preserved as an archive of a [[WP:RM|requested move]]. <span style="color:red">'''Please do not modify it.'''</span> Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.''</div><!-- Template:RM bottom -->
 
==Array structure?==
These articles about arrays have become a collection of ORIGINAL RESEARCH which is not the purpose of WP.
An array is called just an 'array' and hardly ever called an 'array structure'. The hair-splitting activity w/r/t to 'array data structure' and 'array data type' is similarly obscure. Someone please provide definitive reference to the legitimacy of the terms and their definition. The new set of articles is confusing and almost incomprehensible even for knowledgeable readers. Side-by-side comparison of the original with the new clearly reveals that the original array article was superior article for encyclopedic use. [[User:Kbrose|Kbrose]] ([[User talk:Kbrose|talk]]) 06:33, 16 May 2009 (UTC)
\</sup>
 
::: MOVED MATERIAL FROM PERSONAL TALK PAGE: Hi, you removed the [[:Template:distinguish:Array data type]] from [[array data structure]] and added "original research" and "expert attention needed" in addition to the "unreferenced" and "cleanup needed" tags that I had already put there. Now, I won't call myself an expert, but I have been programming data strcutures for 40 years, and I am quite familiar with language design, type theory, etc.., from COBOL to Modula-3. So, Yes, those articles still need a lot of checking and editing; but I dare say that they are a bit better than the original [[Array]] article. The main problem of the latter (which is still present in [[data type]] and other related articles) was a pervasive confusion between "data strcutures", "data types", and "abstract data types", which are three very different things. What I did was basically separate the first two. Besides, much of the material in the two new articles came from the old Array article. So, if you feel uncomfortable about some parts, please be more specific,and we may discuss them. All the best, --[[User:Jorge Stolfi|Jorge Stolfi]] ([[User talk:Jorge Stolfi|talk]]) 07:56, 16 May 2009 (UTC)
Line 300 ⟶ 305:
 
[[User:Denispir|denis &#39;spir&#39;]] ([[User talk:Denispir|talk]]) 18:09, 9 December 2012 (UTC)
 
== "A programmer (or a sophisticated compiler) may use this information to choose between ... ==
 
... row- or column-major layout for each array."
 
'''Very nice''', but in what actual programming language is that possible"
 
:Several languages and libraries for numeric computing, e.g. NumPy. I'm not aware of compilers that do this. [[User:Qwertyus|Q<small>VVERTYVS</small>]] <small>([[User talk:Qwertyus|hm?]])</small> 10:51, 25 February 2016 (UTC)
 
== A Commons file used on this page has been nominated for deletion ==
The following Wikimedia Commons file used on this page has been nominated for deletion:
* [[commons:File:Octicons-terminal.svg|Octicons-terminal.svg]]<!-- COMMONSBOT: discussion | 2019-07-26T23:37:55.984986 | Octicons-terminal.svg -->
Participate in the deletion discussion at the [[commons:Commons:Deletion requests/File:Octicons-terminal.svg|nomination page]]. —[[User:Community Tech bot|Community Tech bot]] ([[User talk:Community Tech bot|talk]]) 23:38, 26 July 2019 (UTC)
 
== Discuss delayed and manifest arrays ==
 
We should have a section that discusses different conceptual representations of arrays i.e. manifest and delayed. On a high level:
 
Manifest arrays
 
* exists in memory;
* contain trash from the memory without initialisation
* can be hidden behind functions to act as delayed arrays
 
Delayed arrays
 
* do not have to actually exist;
* are represented by a function of type (!! :: ix -> a) where ix is the index type and a is the type of the values of the array;
* Multidimensional array access translates to function composition
 
Delayed arrays seem to become more and more prominent in languages such as Haskell, Accelerate, Single Assignment C, Halide, Repa, Massiv and Futhark.
 
 
--[[User:Cluzz|Cluzz]] ([[User talk:Cluzz|talk]]) 15:33, 21 January 2020 (UTC)
 
== clarity ==
 
There needs to be some clarity as to what an array is, it seems sometimes it is a consecutive series of same sized elements in a datastructure (consecutive in memory) but then memory on most modern systems isn't physically consecutive anyway... since it is virtualised, so then... is it a logic (pretend) consecutive series of same sized elements? then we have associative arrays, which don't seem to be arrays at all but often lists of things. I know what I was taught originally an array to be, as in k&r C, but... that doesn't appear to be the definitive definition of array - at least any more. [[Special:Contributions/103.232.162.28|103.232.162.28]] ([[User talk:103.232.162.28|talk]]) 18:28, 1 June 2025 (UTC)