Rosetta Code:Village Pump/Arrays: Difference between revisions

no edit summary
m (changed a punctuation. -- ~~~~)
No edit summary
Line 29:
 
I wonder though whether this site is suitable for providing generic translations or patterns that might be applied in any language to create or emulate a missing construct. For example, implementing static arrays using hashes or strings. ----[[Special:Contributions/66.245.151.131|66.245.151.131]] 04:39, 13 August 2009 (UTC)
 
 
The confusion arises from using the term "array" for different things. This causes ambiguity in the task description. As far as I see it, we can distinguish the following categories:
 
# linear array, i.e. lists (including list of lists)
# associative arrays, (i.e. hash arrays).
# multidimensional arrays (i.e. static array), the number of elements along a certain dimension is fixed. This type of array allows for random access. A matrix is usually a two-dimensional array.
 
If some languages uses the term "array" for some other data structure, it should be added here.
 
Any task description should consider this distinction and make clear which kind of array should be used. Only then we can avoid ambigous task descriptions. [[User:Aschloegl|Aschloegl]] ([[User talk:Aschloegl|talk]]) 15:21, 21 July 2013 (UTC)
Anonymous user