HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
tc39
proposal-flatMap
HTML2018–2022
tc39 / proposal-flatMap · Archived

proposal-flatMap

proposal for flatten and flatMap on arrays

10Distinct people
11Mentions
0Explicit recommenders
213GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

proposal for flatten and flatMap on arrays

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2018-03-07 08:29:38 UTC to 2022-10-10 23:18:14 UTC.

02462018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 7 mentions; 2 submissions, 5 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC725
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101

What Hacker News says

11 sources
Infinity was originally the default (which feels intuitive), but here's the argument for changing it [0]: "I think Array#flatten should be shallow by default because it makes sense to do less work by default, it aligns with existing APIs like the DOM Node#cloneNode which is shallow by default, and it would align with the existing ES3 pattern of using Array#concat for a shallow flatten. Shallow by default would also align with flatMap too." [0] https://github.com/tc39/proposal-flatMap/issues/9
In What’s New in ES2019
Infinity was originally the default (which feels intuitive), but here's the argument for changing it [0]: "I think Array#flatten should be shallow by default because it makes sense to do less work by default, it aligns with existing APIs like the DOM Node#cloneNode which is shallow by default, and it would align with the existing ES3 pattern of using Array#concat for a shallow flatten. Shallow by default would also align with flatMap too." [0] https://github.com/tc39/proposal-flatMap/issues/9
In What’s New in ES2019
The "don't break the web" excuse is the same old bad-faith nonsense: 1. The number of websites using the old version of Mootools is vanishingly remote, relative to the number of existing websites not using it, and the number of as-yet-unmade websites who will also not use it (but who will be harmed by the committee's dedication to retarding the development of the language). 2. Of those websites using this old version of Mootools, the number that use flatten, and do so in a way that would definitely be broken by the introduction of standardised "flatten", and wouldn't be fixed thereafter is, statistically speaking, zero. 3. Most of the same people who are affecting concern about backwards compatibility in the case of the web work for tech giants who regularly retire products and APIs that are relied upon by thousands of people, and make ba
Read the rest
ckwards incompatible changes to their operating systems that break masses of unmaintained apps. But the fact is, you can't make arguments like this to groups like the TC39 and expect to even get a hearing. Despite their occasional spiel about seeking outsider feedback they are, like any institution, happy in their long-settled groupthink positions, and reflexively frightened and dismissive of any challenge or criticism by outsiders. You saw this when the whole "smoosh" affair first broke. There was a long, passionate, but civilised debate about it on GitHub (https://github.com/tc39/proposal-flatMap/pull/56 ) which was abruptly cut off by a TC39 committee member, who locked out non-contributors entirely, with the dishonest claim that things had become "too heated". What he really couldn't stand was the sight of the committee's dogma being challenged. Remember that next time the representative of a standards body whines about lack of participation in the process by regular web developers. It's a lie. These groups are only interested in the opinion of outsiders if they align with a set of fixed and unchallengeable precepts, and they will revert to depressingly familiar suppression of speech the moment it looks like things aren't going their way.
In ECMA TC39: “SmooshGate” was officially resolved by renaming flatten to flat
Technical Committee 39 of ECMA [1] is the governing board for the living ECMAScript standards documents, which influence the direction of the language we more often call JavaScript. There's a current TC39 proposal [2] (at Stage 3, which is the discovery stage to gauge feasibility in browsers) to add officially to the language standard `Array.prototype.flatten()` (to flatten an array like `[[1, 2], 3, [4, 5]]` to `[1, 2, 3, 4, 5]`) and `Array.prototype.flatMap` (to `flatten().map()` as a single operation). Because browser vendors discovered some libraries in the wild (8+ year old versions of MooTools) install their own incompatible to the new spec version of `Array.prototype.flatten` that does something different from the array flattening above, there is a discussion (as PR) [3] to avoid breaking ancient websites by choosing a new name for
Read the rest
the proposed `Array.prototype.flatten`, in the case of the PR `Array.prototype.smoosh`. (For consistency it then renames `Array.prototype.flatMap` to `Array.prototype.smooshMap`.) Other names are being discussed as well in the PR, and the TC39 committee has not yet actually met on the subject at this time, so nothing is quite set in stone. [1] https://github.com/tc39 [2] https://tc39.github.io/proposal-flatMap/ [3] https://github.com/tc39/proposal-flatMap/pull/56
In Don't let TC39 use smoosh or smooshMap

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.