Talk:Collections

From Rosetta Code
Revision as of 05:09, 3 June 2010 by rosettacode>Paddy3118 (→‎too much J?: I think it's OK.)

"Collections", as a task, is far from being clearly defined. Can someone add a brief description or a list of task requirements? --Shock 20:24, 24 January 2007 (EST)

Seconded. It's unclear what "objects" should be in a language that doesn't have any objects, but where all "collections" are polymorphic anyway, and hence can store any type (not only primitive types). And why is it necessary to have this restriction in the first place? To rule out simple C-style arrays? It's also unclear what interface a "collection" should expose (other that than one can add elements). In many languages, collections offer a generic way to unify access to some concrete container datatype, with operations like map, fold (sometimes called reduce), or filter (sometimes called select). Is that what is meant here? If so, is only the generic interface of interest, or also concrete implementations (lists, arrays, various trees)? --Dirk Thierbach 18 November 2007

Clarified. I removed the type restriction, as well. --Short Circuit 12:57, 21 November 2007 (MST)

Please clarify in which sense the words "set" and "value" are used. Is set ordered? Are values comparable? Mathematically, array is not a set, it is an ordered set. Do arrays qualify? Further, the word "value" presume "value semantics." Is it an intention of the task? Shall the entities put into the collection be copied upon the operation? --Dmitry-kazakov 02:38, 3 June 2008 (MDT)

Some examples are "marked" but they seems complete, showing various kinds of collection (which is a rather generic term even in computer world); e.g. C++ is the most "complete", to me. D shows something similar, and it is not marked. Java shows lists as collection, and it is not marked (so, it shouldn't be marked C++; at most it should be shortened). Javascript (PHP...) is(are) marked, but it(they) show/s something not so different from Python or Ruby, which are not marked. Similarly for Smalltalk, which anyway shows only an ordered collection (enough to eliminate the Ordered part?)...
Wanting to add languages like C and Fortran, a simple array or a queue (like FIFO...) seem (sometimes) unable to accomplish the task... Is it so? --ShinTakezou 13:42, 2 March 2009 (UTC)

too much J?

The J entry currently provides a variety of collection related options which were not required by the task [so, ok, the task was trivially simple in J and maybe more stuff makes this interesting]. Should they be left there because they may be of interest? Should they be removed so that the task requirements are followed more precisely? Or should anything else be done with them (moved to the talk page, turned into distinct tasks, elaborated on, printed on a t-shirt, fed to penguins, ...)? --Rdm 02:42, 3 June 2010 (UTC)

Nah. Collections seem to be big in J, hence the length of its entry. --Paddy3118 05:09, 3 June 2010 (UTC)