4 ms·
What is TC39? And what is smoosh?
by cpburns2009 9y ago
What is TC39? And what is smoosh?
- retrocat 9y agoTC39 is the standard body for ECMAScript, which JavaScript implements. smoosh was a proposed alternative name (see: https://github.com/tc39/proposal-flatMap/pull/56 https://github.com/tc39/proposal-flatMap/pull/56) for flatten (and smooshMap for flatMap) due to incompatibilities with older libraries (namely, Mootools).
- WorldMaker 9y agoTechnical 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 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 https://github.com/tc39 [2] https://tc39.github.io/proposal-flatMap/ https://tc39.github.io/proposal-flatMap/ [3] https://github.com/tc39/proposal-flatMap/pull/56 https://github.com/tc39/proposal-flatMap/pull/56