News for hackers. Stuff that matters.
Re:Functional Programming Jargon by dfabulich on Tuesday November 07, 2017 @03:35PM (#15647308)
My biggest request would be to add "map" to the list, precisely because it's ambiguous. It could mean:

1) any key/value data structure

2) a hashmap, specifically

3) a function that runs on each element of an array to make a new array

Re:Functional Programming Jargon by rbobrowicz on Tuesday November 07, 2017 @04:00PM (#15647578)
Those are all just particular cases of the same concept. A "map", well, maps values in a domain to values in a codomain. A mathematical function is a map. A key/value data structure can be viewed as a partial function on a non contiguous, discrete domain. A hashmap is just an implementation detail of a key/value structure. A map over an array is again just a function mapping an array in one domain to another array in a codomain.
Re:Functional Programming Jargon by skybrian on Tuesday November 07, 2017 @04:20PM (#15647757)
While that's true in a sense, I think it sweeps important details under the rug, which confuses things more than it enlightens. You can iterate over the domain of a map data structure, but not (in general) a map function.

For purposes of education and communication, I think it's unfortunate that we use the same name for these things.

Re:Functional Programming Jargon by Mikeb85 on Tuesday November 07, 2017 @03:54PM (#15647513)
In a functional language I'd expect it to be #3 every time, no?
Re:Functional Programming Jargon by castis on Tuesday November 07, 2017 @03:59PM (#15647570)
my only experience with this being confusing is the immutable.js Map construct.

https://facebook.github.io/immutable-js/docs/#/Map

While this doesn't cause an immense amount of confusion, it does throw me every once in a while.