Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
Lusum (talk | contribs)
Haskell: +haskell source tag
bad link repair, general fixes & manual clean up, typos fixed: a immutable → an immutable, replaced: {{Citation needed|date=December 2008}}. → .{{Citation needed|date=December 2008}}, [ using AWB (8686)
Line 61:
Another 3rd party library, [http://uthash.sourceforge.net/ uthash], also creates associative arrays from C structures. A structure represents a value, and one of the structure fields acts as the key.
 
Finally, the [[Glib]] library also supports associative arrays, along with many other advanced data types and is the recommended implementation of the GNU Project.{{Citation needed|date=December 2008}}.
 
Similar to [[Glib]], [[Apple Inc.|Apple]]'s cross-platform [[Core Foundation]] framework provides several basic data types. In particular, there are reference counted CFDictionary and CFMutableDictionary.
 
===C#===
Line 691:
 
===Optimj===
{{Ref improveRefimprove section|date=February 2011}}
The [[OptimJ]] programming language is an extension of Java 5. As java, Optimj provides maps. But, OptimJ also provides true associative arrays: java arrays are indexed with 0-based integers; associative arrays are indexed with any collection of keys.
 
Line 1,058:
 
===Scala===
[[Scala (programming language)|Scala]] provides aan immutable Map class as part of the scala.collection framework:
 
<source lang=Scala>
Line 1,096:
</source>
Dictionary hashes/compares based on equality and holds
[[ Garbage collection (computer science)#Strong and Weak references| strong references ]] to both key and value. Variants exist which hash/compare on identity (IdentityDictionary) or keep [[ Garbage collection (computer science)#Strong and Weak references|weak references]] (WeakKeyDictionary / WeakValueDictionary).
 
===SNOBOL===