Talk:Container (abstract data type)
|WikiProject Computer science|
|This article is the subject of an educational assignment at College Of Engineering Pune supported by Wikipedia Ambassadors through the India Education Program during the 2011 Q3 term. Further details are available on the course page.|
Definetly needs to be merged
- All informations from Container class have been merged here. Links from Container class have also been redirected to this article Hervegirod 13:09, 27 May 2007 (UTC)
Container vs collection
There's an other article with similar content: Collection (abstract data type).
To my mind, both collections and containers are related, but are definitively not the same concept. A container hold one or many other objects, allowing access to those objects through the container and eventually providing some kind of support to the stored objects.
A collection is a special kind of container (inheritance relation here), whose only purpose is to store and retrieve objects.
- IMHO, container is any type which contains another, e.g. wrappers etc. Collection should consist of multiple objects. Needs to be de-merged! 184.108.40.206 (talk) 11:05, 18 November 2008 (UTC)
- That's a circular definition "container is any type that contains another"! Yttrill (talk)
- to my mind both these articles are severely restricted by talk of objects. Containers and/or collections exist in functional programming languages too. Yttrill (talk) —Preceding undated comment added 14:47, 13 February 2011 (UTC).
H Brydon 2011/03/18
- IMHO a collection of objects is different from a container. A dozen apples is different from a basket of apples, which is different from a bag of 12 apples. The apples are a collection. The basket and bag are containers. And of course there could be a truckload of bagged apples or a box of bags. The collection and the container are distinct... should be de-merged —Preceding unsigned comment added by 220.127.116.11 (talk) 02:19, 19 March 2011 (UTC)
- Should not be merged, as they are not the same. A collection is a group of resources that are related to each other in some identifiable way. A container does contain a number of objects of the same type (according to this). Sae1962 (talk) 08:20, 20 June 2011 (UTC)
- Should be merged, in the context of Abstract Data Types. That is to say, as far as ADTs are concerned the two terms are synonymous. We can say that a container has an existence even if empty (like an instance of an ADT). While there may be collections that are not contained - e.g., there was no container as such that held the Beatles - this distinction is irrelevant as far as ADTs are concerned, as data collections are by definition contained in a data structure. Trevithj (talk)
Gabor Melli 2013/12/01
- Should be merged into Collection (ADT),
my main evidence is that data structure textbooks do not differentiate between the two. e.g. 
Also, the literature prefers "Collection" over "Container" (e.g. ). Notice, that the search on Collection in Google Scholar returns ~7,000 documents"a+collection"+"abstract+data+type"+-java while on Container returns only ~400 "a+container"+"abstract+data+type"+-java (I removed "java" from the search to show that "container" is Java centric - which is additional evidence that "Container" more often refers to a data structure rather than an ADT).
Do the merge
I suggest doing the merge, as I have removed half the text of the "Container" article as too vague to be useful or too language centric to be meaningful, the rest does not appear to be substantive enough to retain.
Alternatively, one might agree that a container is something that "holds" a collection, which would make it a substantially more "object oriented" notion than collection. For example a list in a functional language is not an object and it is not a container but it is a collection. The same list in C++ is likely to be managed by a top level holder object or container.
However Wikipedia shouldn't be reflecting my personal thoughts on this. Unless some substantive references can be cited it should not be making the distinction. I can suggest relevant definitions from ISO Standards may be useful (I don't mean language standards, ISO also publishes language independent computing related definitions, and these ought to be considered "standard" enough to cite -- if you can get access to them).
- I agree that with what is in the article for now, it would be better to merge it with Collection, and add in the Container disamb some text explaining that a Container hold a Collection of elements. Hervegirod (talk) 16:41, 13 February 2011 (UTC)
- disagree A collection is a meta concept above a data structure. It should not be merged. Perhaps, the Collection article should reflect this better, but a merge would be inappropriate with the concept. Sae1962 (talk) 21:52, 1 April 2011 (UTC)