Rosetta Code:Village Pump/Arrays: Difference between revisions

m
changed a punctuation. -- ~~~~
m (corrected two misspellings. -- ~~~~)
m (changed a punctuation. -- ~~~~)
Line 16:
:I agree with this entirely. (Also, if we're going to be specific about the kind of data structure, I would suggest (as opposed to "contiguous memory"): consecutive numeric indexing, arbitrary size, and no greater than O(log n) element access time.) --[[User:Kevin Reid|Kevin Reid]] 11:35, 30 July 2009 (UTC)
 
:: As for element access time, that would be a sticky wicket. Some REXX interpreters have serial lookup for all variables (including array elements), some (if not most) have hashing techniques. Most REXX programmers don't know nor care. REXX may be one of the few languages that doesn't keep it's array elements in sequential order. The term then, consecutive numeric indexing, falls by the wayside in REXX. One can assign array elements consecutively (numerically), but that would be just an artifact. You'd have to add another one or two or three categories, and I struggle to think what they would be called: a.2=222; a.02=333; a.2.=444; a..2='omg'; g=.7; a.g=555; h='±'; a.h=666 --- all unique. I think grouping arrays by how the language supports them would get argumentative fast, depending on how one interprets the definitions and understanding on ''how'' a particular version of a language worked. Technically, REXX wouldn't even be invited to his party, as it doesn't have "true" arrays, but that doesn't stop anyone from using REXX's version of arrays,: ''stemmed arrays''. They look, taste, feel, and smell like arrays, so, what the heck. -- [[User:Gerard Schildberger|Gerard Schildberger]] 19:37, 20 May 2012 (UTC)
 
:I think it would be fine to merge [[Creating an Array]], [[Assigning Values to an Array]], and [[Retrieving an Element of an Array]], mostly as a way to show off a language's built-in syntax for native arrays. I think some of the higher order array tasks ([[Select from Array]], [[Apply a callback to an Array]], [[Sorting an Array of Integers]], etc.) should instead operate on the most convenient collection available to the language, no matter whether it is an array, list or some other collection object. --[[User:IanOsgood|IanOsgood]] 17:16, 30 July 2009 (UTC)