Talk:Array (data structure): Difference between revisions

Content deleted Content added
too detailed for start class but too disorganized for B class
Line 11:
 
== '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)