Juerd wrote: > Michael Homer skribis 2004-09-08 15:54 (+1200): > > I think (correct me) what he's getting at here is a sparse array 1=>a, > > > 3=>b, 4=>c where 2nd is 'b' (the second item) but 1st+1 is undefined > > (there is no index 2). I don't know how well that scheme works from a > > comprehension point of view though, it seems a little confusing. > > Oh my, sparse arrays. Isn't that what we have hashes for?
In theory, yes; but there are some aspects of sparse arrays that hashes simply don't capture - the most notable being that the elements of a sparse array are implicitly ordered, whereas the elements of a hash are implicitly unordered (you have to explicitly coerce them into an order whenever you want that factor). ===== Jonathan "Dataweaver" Lang __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail