Talk:Associative array

message: Someone should describe how to insert elements into a hash table. — Preceding unsigned comment added by  71.141.127.226  (talk) 22:39, 10 September 2006 (UTC)
thread_title:  appending 

message: :The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion. 
The result of the move request was: (non-admin closure) NO CONSENSUS User:力 (powera, π, ν) 23:46, 5 February 2022 (UTC)
replies: text: Stack (data type) is just a redirect to Stack (abstract data type), it should be fine to use the shorter name. That redirect was actually one of the reasons I proposed the move. As far as ADT vs data type, Data type#Abstract data types defines ADTs as a subset of data types, so the move seems correct from a hierarchy perspective. As far as "global RFC", what do you mean? It is already listed at Wikipedia:Requested_moves#January_26,_2022, this seems to be the maximum level of visibility Wikipedia has for proposed moves. --Mathnerd314159 (talk) 19:21, 28 January 2022 (UTC)
replies: text: See WP:RFC. AXONOV (talk) ⚑ 08:28, 29 January 2022 (UTC)

text: Agree The "abstract" in "abstract data type" doesn't add anything, and thus is unnecessary. I'm agnostic about "associative array" vs. "dictionary". --Macrakis (talk) 22:10, 30 January 2022 (UTC)
replies: text: Disagree. It gives a abstract description of the data type ideas regardless of the language in use. AXONOV (talk) ⚑ 16:43, 5 February 2022 (UTC)

text: A tree data type is a set of values of tree data structures.
Moreover, the page also provides a diagrammatization of the difference between a "tree data structure" and a "tree data value".Hundblue (talk) 17:14, 30 January 2022 (UTC)

text: You are failing to distinguish a data type (the API: what you do with it) from a data structure (how you implement it and how fast that implementation runs). This article is mostly about the data type. There is no single dictionary data structure; there are many structures with different names that implement that data type, some of which are listed in the "implementation" section of this article. So your suggestion of Dictionary (data structure) is one that I think is incorrect and should not be used, because it incorrectly suggests that there is a single data structure described by this article, when really it is the data type that is described here. —David Eppstein (talk) 22:39, 1 February 2022 (UTC)

text: A dictionary is a structure  where  is a set of nodes,  is a set of keys,  is a set of values,  is a distinguished node and  is a relation between keys and values (a subset of ) that is finite and functional.
Alternatively, one can first define a dictionary context  and then define a -dictionary to be a pair  with the same constraints as above. The set (denote it ) of all -dictionaries makes up for a "dictionary type". This set  is not itself a dictionary. One can define "API" operations:
 by 
,
 by 
,
 by
 iff .
The operations  and  preserve "identity" (only the map is changed, not the node) like corresponding operations in JavaScript / Ruby / Python.
Note that there is a distinction between a dictionary (an element of ) and a node (an element of ). That is,  in the JavaScript / Ruby / Python code d1 = {"a":5}, d1 is not a dictionary but a node. After the insert operation d1["a"] = 7, the d1 node is the same like before the operation. What has been changed is the associated map (the -component). That is, in JavaScript / Ruby / Python, there is a global association of nodes to finite maps. Such association can be expressed as a set  of source-name-target triples, see Nested dictionary.
The above text should document that at least in the JavaScript / Ruby / Python environments, there is a single common abstraction of the dictionary concept. In this abstraction, a dictionary is a mathematical structure, just like e.g. lattice in order theory. Thus, there is a reason to combine the words "dictionary" and "structure". The additional term "data" might be used for disambiguation.
But I understand that the whole term "dictionary data structure" might already have established another meaning(s) - that of "implementation" structures of the dictionary concept. For this reason, I suggest to keep the current page name Associative array - which is neutral w.r.t. data-structure vs. data-type issues.
I disagree with the rename Dictionary (data type) since it incorrectly suggests that the page provides a valid definition of the term "dictionary data type". It presently does not. --Hundblue (talk) 13:31, 2 February 2022 (UTC)

text: The things you are talking about are basically instances of the specific data type. I also would like to see comparison of popularity between Dictionary and Associative arrays in actual sources. I don't think that dictionary usage is prevailing. I also have to agree with 's opinion above. AXONOV (talk) ⚑ 16:42, 5 February 2022 (UTC)
thread_title:  Requested move 26 January 2022 

message: I tend to support this but it may not work well for s... I suggest we pursue global RFC for this. I also would like to refer you to Abstract data type article to get sense of rationale behind titles. Courtesy pinging . He had pretty good summary on differences here: Talk:Data type#Topic of this article. AXONOV (talk) ⚑ 09:27, 27 January 2022 (UTC)
replies: text: Stack (data type) is just a redirect to Stack (abstract data type), it should be fine to use the shorter name. That redirect was actually one of the reasons I proposed the move. As far as ADT vs data type, Data type#Abstract data types defines ADTs as a subset of data types, so the move seems correct from a hierarchy perspective. As far as "global RFC", what do you mean? It is already listed at Wikipedia:Requested_moves#January_26,_2022, this seems to be the maximum level of visibility Wikipedia has for proposed moves. --Mathnerd314159 (talk) 19:21, 28 January 2022 (UTC)
replies: text: See WP:RFC. AXONOV (talk) ⚑ 08:28, 29 January 2022 (UTC)

text: Agree The "abstract" in "abstract data type" doesn't add anything, and thus is unnecessary. I'm agnostic about "associative array" vs. "dictionary". --Macrakis (talk) 22:10, 30 January 2022 (UTC)
replies: text: Disagree. It gives a abstract description of the data type ideas regardless of the language in use. AXONOV (talk) ⚑ 16:43, 5 February 2022 (UTC)

text: A tree data type is a set of values of tree data structures.
Moreover, the page also provides a diagrammatization of the difference between a "tree data structure" and a "tree data value".Hundblue (talk) 17:14, 30 January 2022 (UTC)

text: You are failing to distinguish a data type (the API: what you do with it) from a data structure (how you implement it and how fast that implementation runs). This article is mostly about the data type. There is no single dictionary data structure; there are many structures with different names that implement that data type, some of which are listed in the "implementation" section of this article. So your suggestion of Dictionary (data structure) is one that I think is incorrect and should not be used, because it incorrectly suggests that there is a single data structure described by this article, when really it is the data type that is described here. —David Eppstein (talk) 22:39, 1 February 2022 (UTC)

text: A dictionary is a structure  where  is a set of nodes,  is a set of keys,  is a set of values,  is a distinguished node and  is a relation between keys and values (a subset of ) that is finite and functional.
Alternatively, one can first define a dictionary context  and then define a -dictionary to be a pair  with the same constraints as above. The set (denote it ) of all -dictionaries makes up for a "dictionary type". This set  is not itself a dictionary. One can define "API" operations:
 by 
,
 by 
,
 by
 iff .
The operations  and  preserve "identity" (only the map is changed, not the node) like corresponding operations in JavaScript / Ruby / Python.
Note that there is a distinction between a dictionary (an element of ) and a node (an element of ). That is,  in the JavaScript / Ruby / Python code d1 = {"a":5}, d1 is not a dictionary but a node. After the insert operation d1["a"] = 7, the d1 node is the same like before the operation. What has been changed is the associated map (the -component). That is, in JavaScript / Ruby / Python, there is a global association of nodes to finite maps. Such association can be expressed as a set  of source-name-target triples, see Nested dictionary.
The above text should document that at least in the JavaScript / Ruby / Python environments, there is a single common abstraction of the dictionary concept. In this abstraction, a dictionary is a mathematical structure, just like e.g. lattice in order theory. Thus, there is a reason to combine the words "dictionary" and "structure". The additional term "data" might be used for disambiguation.
But I understand that the whole term "dictionary data structure" might already have established another meaning(s) - that of "implementation" structures of the dictionary concept. For this reason, I suggest to keep the current page name Associative array - which is neutral w.r.t. data-structure vs. data-type issues.
I disagree with the rename Dictionary (data type) since it incorrectly suggests that the page provides a valid definition of the term "dictionary data type". It presently does not. --Hundblue (talk) 13:31, 2 February 2022 (UTC)

text: The things you are talking about are basically instances of the specific data type. I also would like to see comparison of popularity between Dictionary and Associative arrays in actual sources. I don't think that dictionary usage is prevailing. I also have to agree with 's opinion above. AXONOV (talk) ⚑ 16:42, 5 February 2022 (UTC)
thread_title:  Discussion 

message: I disagree with the rename of Tree (data structure) to Tree (data type). The terms "tree data structure" and "tree data type" denote different notions. The difference is described in Tree_(data_structure)#Data_type_versus_data_structure and Rose_tree#Tree_data_type. The latter page states the following relationship between the terms:
:A tree data type is a set of values of tree data structures.
Moreover, the page also provides a diagrammatization of the difference between a "tree data structure" and a "tree data value".Hundblue (talk) 17:14, 30 January 2022 (UTC)
thread_title: Tree data structure versus Tree data type

message: I think the 3 terms denote distinct notions.
A single dictionary (data structure), or just a dictionary, is a representation of a finite map posessing its own identity.
Two distinct dictionaries can represent the same finite map - in that case, the dictionaries have the same value (namely the finite map).
A single dictionary (data type) is a set of dictionaries (or something that represents such a set) which are then called instances of that type.
A single dictionary (abstract data type) is a set of dictionary values. In context of functional programming where there are only values (i.e. two distinct entities cannot have the same value), the "abstract" adjective is redundant.
d1 = {"a":5}
d2 = {"a":5}
Consider the JavaScript / Ruby / Python code shown in the box on the right in which dictionaries d1 and d2 are created. (The respective terminology for "dictionary" is "object" / "hash" / "dict".) The following is satisfied:
 will affect only d1.
 d1 and d2 have the same value. In Ruby and Python, this can be verified by the value comparison operator == (i.e., in these two languages, d1 == d2 evaluates to true or True).
The dictionaries d1 and d2 are not data types - instead, they are instances of a single built-in dictionary type (named respectively Object / Hash / dict – "the dictionary").
Conclusion: Instead of the rename Associative array → Dictionary (data type) (which I disagree with) I suggest Dictionary (data structure). --Hundblue (talk) 22:31, 1 February 2022 (UTC)
replies: text: You are failing to distinguish a data type (the API: what you do with it) from a data structure (how you implement it and how fast that implementation runs). This article is mostly about the data type. There is no single dictionary data structure; there are many structures with different names that implement that data type, some of which are listed in the "implementation" section of this article. So your suggestion of Dictionary (data structure) is one that I think is incorrect and should not be used, because it incorrectly suggests that there is a single data structure described by this article, when really it is the data type that is described here. —David Eppstein (talk) 22:39, 1 February 2022 (UTC)

text: A dictionary is a structure  where  is a set of nodes,  is a set of keys,  is a set of values,  is a distinguished node and  is a relation between keys and values (a subset of ) that is finite and functional.
Alternatively, one can first define a dictionary context  and then define a -dictionary to be a pair  with the same constraints as above. The set (denote it ) of all -dictionaries makes up for a "dictionary type". This set  is not itself a dictionary. One can define "API" operations:
 by 
,
 by 
,
 by
 iff .
The operations  and  preserve "identity" (only the map is changed, not the node) like corresponding operations in JavaScript / Ruby / Python.
Note that there is a distinction between a dictionary (an element of ) and a node (an element of ). That is,  in the JavaScript / Ruby / Python code d1 = {"a":5}, d1 is not a dictionary but a node. After the insert operation d1["a"] = 7, the d1 node is the same like before the operation. What has been changed is the associated map (the -component). That is, in JavaScript / Ruby / Python, there is a global association of nodes to finite maps. Such association can be expressed as a set  of source-name-target triples, see Nested dictionary.
The above text should document that at least in the JavaScript / Ruby / Python environments, there is a single common abstraction of the dictionary concept. In this abstraction, a dictionary is a mathematical structure, just like e.g. lattice in order theory. Thus, there is a reason to combine the words "dictionary" and "structure". The additional term "data" might be used for disambiguation.
But I understand that the whole term "dictionary data structure" might already have established another meaning(s) - that of "implementation" structures of the dictionary concept. For this reason, I suggest to keep the current page name Associative array - which is neutral w.r.t. data-structure vs. data-type issues.
I disagree with the rename Dictionary (data type) since it incorrectly suggests that the page provides a valid definition of the term "dictionary data type". It presently does not. --Hundblue (talk) 13:31, 2 February 2022 (UTC)

text: The things you are talking about are basically instances of the specific data type. I also would like to see comparison of popularity between Dictionary and Associative arrays in actual sources. I don't think that dictionary usage is prevailing. I also have to agree with 's opinion above. AXONOV (talk) ⚑ 16:42, 5 February 2022 (UTC)
thread_title: Dictionary: data structure / data type / abstract data type

message: (From above) : I started a talk page for renaming this page on Wikipedia talk:WikiProject Computer science#Rename Associative array -%3E Dictionary (abstract data type)
KenyonP (talk) 06:53, 27 February 2024 (UTC)
thread_title:  Renaming discussion on WikiProject Computer science