[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ongoing work, maps and dictionaries

This page is part of the web mail archives of SRFI 44 from before July 7th, 2015. The new archives for SRFI 44 contain all messages, not just those from before July 7th, 2015.



scgmille@xxxxxxxxxxxxxxxxxx wrote:
On Mon, Nov 10, 2003 at 12:11:09PM -0800, Bradd W. Szonye wrote:

The current draft has this change, with a Map type for
single-key->single-value collections, and a Dictionary subtype for
single-key->multiple-value collections.

Not too happy about the specific name choices, though. Set theory calls
a MxN mapping a "relationship" or just "mapping." Mx1 mappings are
usually called "partial functions" or "functions" (depending on whether
the mapping covers the entire domain). In other words, "mapping" is the
more general name.

Being a math major this use of the word "map" is very confusing.
I use the terms "map" and "function" as synonyms. If I want to
describe a one-to-many or a many-to-may relation, I use the word
"relation".

  <http://mathworld.wolfram.com/Map.html>
  <http://mathworld.wolfram.com/Relation.html>

I.e. I support the choice "Map" for single-key->single-value collections
and "Dictionary" for single-key->multiple-value collections.

Dictionary at least Just Makes Sense, as real dictionaries bind words to one or more definitions.

The word "relation" are also well known to most programmers due to the
wide spread use of relational databases, but "dictionary"
has in this context the advantage that one knows its a one-to-many relation
and not a many-to-many relation.

--
Jens Axel Søgaard