Hashes

From WhyNotWiki

Jump to: navigation, search

I don't really like the name "hash", but the other alternatives, map and dictionary, are ambiguous. "Mapping" might be okay. I may rename this topic later.

Aliases: Hash, Map (data structure), Dictionary (data structure), Mappings, Maps (data structure), Collection of key-value pairs, Collection of key:value pairs, key:value pairs

[edit] Ordered maps

Ordered Mapping Language-Independent Type for YAML™ Version 1.1 (http://yaml.org/type/omap.html). Retrieved on 2007-05-11 11:18. [YAML (category)]

Ordered sequence of key:value pairs without duplicates.

A common type used for modeling is the ordered list of named values, where duplicates are not allowed. For example, this is the basic collection data type used by the PHP language. Most programming languages do not have a built-in native data type for supporting ordered maps. Such data types are usually provided by libraries. If no such data type is available, an application may resort to loading an “!!omap” into a native array of hash tables containing one key each.

[edit] Native support in programming languages

Ruby: not built-in; can use the Dictionary class from Facets.

Personal tools