3 ms·
That's because perl developers knew lisp and functional languages before and therefore avoided the misleading term "map", which is an operator to apply a functi
by rurban 8y ago
That's because perl developers knew lisp and functional languages before and therefore avoided the misleading term "map", which is an operator to apply a function on a vector (=array) or list since the late 50ies.
a map vs to map is misleading.
"table" is shorter than "dictionary" and also describes the structure better. A dictionary is mostly a book, or a list of keys (/usr/share/dict).
prolog also used the term "table" or "tabling" for its caching of backtrackings, what we would call "memoize" or memoization via a hash table.
- kazinator 8y ago> perl developers knew lisp and functional languages It's a practical certainty that the vast majority do not, and its design (up to Perl 5, at least) smacks of total Lisp ignorance. "Map" is used in mathematics as a kind of synonym for "function", especially from some arbitrary set to another one. If you assign the domain < 1, 2, 3, 4 > to the range < 3, 2, 4, 1 >, that's a map. We can draw it as two bubbles containing labeled dots, and draw arrows between the bubbles. This sense of "map" is widely used in computing. For instance "keyboard scan codes get mapped to characters" or "a coordinate in the abstract canvas get mapped to the viewport, which is mapped to the screen" or "the temperature sensor is mapped to GPIO-s 13 to 17." The "map" in Lisp's mapcar is exactly this sense. The map is the function that is being applied: mapcar is using the verb sense: take the car of every cell through the function: i.e. map each domain value to the range. This is called "projection" or "mapping"; "map" is just the verb describing what happens to each individual element.
- kod 8y ago> its design (up to Perl 5, at least) smacks of total Lisp ignorance. https://groups.google.com/forum/?hl=en#!msg/rec.arts.startrek.misc/lHdCwSeQM8k/_AR_qcS1E2sJ https://groups.google.com/forum/?hl=en#!msg/rec.arts.startre... https://groups.google.com/forum/?hl=en#!topic/comp.lang.clos/edcyFOBLMeo%5B51-75%5D https://groups.google.com/forum/?hl=en#!topic/comp.lang.clos...
- kazinator 8y ago"I did dabble in LISP more than I did FORTRAN and it looks like oatmeal with toenail clippings."
- rurban 8y agoYes. If Larry knew how a LISP is implemented, many internals would have looked better. the symtab, the optree, the stack and esp. the lexicals. Just compare to the ruby internals. But at least he knew the terminology, and got the concepts right. In opposition to php and python which failed miserably.