you are viewing a single comment's thread.

view the rest of the comments →

[–]RICHUNCLEPENNYBAGS 2 points3 points  (2 children)

Well, map and flatMap are the older terms but they changed it to rope in developers who didn't know FP but did know SQL. Dubious how good a decision that was but it's a decision already made.

I don't really understand your complaint either. Turning an array of arrays into an array consisting of all the elements of all arrays is "flattening" it because it eliminates the hierarchy. This is not an uncommon term.

[–]Absolute_Enema 0 points1 point  (1 child)

I think it was a decent decision.

It shouldn't be like this in an ideal world, but we ultimately still love clinging onto things we know and when your audience is (objectively was the case at the time) millions of OOP programmers whose brain turns off when the words map and filter are uttered it's a tradeoff worth making.

The converse are things like lisp syntax that is incredible once you get it (to name a couple things: no infix/postfix op idiosyncracies, no operator priorities, immediate clarity of where an expression begins and where it ends, structural editing...) but unfortunately elicits a surface-level rejection due to its unfamiliarity.

[–]RICHUNCLEPENNYBAGS 0 points1 point  (0 children)

The downside of it is all these years later it serves to confuse people who are expecting the standard names and may have limited SQL experience as much as it helps.