Content deleted Content added
→JSON: In JSON, associative arrays are called objects. |
|||
Line 1,200:
This returns an Option type, Scala's equivalent of a [[Monad (functional programming)#The Maybe monad|the Maybe monad]] in Haskell.
−=== [[Smalltalk]] ===
In Smalltalk a dictionary is used:
Line 1,223:
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).
Because every object implements #hash, any object can be used as key (and of course also as value).
=== [[SNOBOL]] ===
|