News for hackers. Stuff that matters.
Re:Perl 11 by rurban on Wednesday October 24, 2018 @04:59AM (#18290781)
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.

Re:Perl 11 by kazinator on Wednesday October 24, 2018 @11:22AM (#18293184)
> 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.

Re:Perl 11 by kod on Wednesday October 24, 2018 @12:34PM (#18293942)
Re:Perl 11 by rurban on Thursday October 25, 2018 @11:58AM (#18301915)
Yes. 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.

Re:Perl 11 by kazinator on Thursday October 25, 2018 @10:54AM (#18301334)
"I did dabble in LISP more than I did FORTRAN and it looks like oatmeal with toenail clippings."