TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Don't let TC39 use smoosh or smooshMap

14 点作者 voctor大约 7 年前

4 条评论

alexbanks大约 7 年前
&gt; The purpose of this library is to prevent TC39 from adding Array.prototype.smoosh and Array.prototype.smooshMap as replacement names for Array.prototype.flatten and Array.prototype.flatMap. They usually don&#x27;t listen to popular votes, but they do listen to the Web and usages of JavaScript in the wild. So here&#x27;s your chance to vote with your code in production. Put this library in your production large-scale website (it&#x27;s very tiny! won&#x27;t hurt) and we&#x27;ll have a compelling case for TC39 not to break backwards compatibility.<p>Why do I not want TC39 to use smoosh or smooshMap?
评论 #16553558 未加载
评论 #16553603 未加载
olliej大约 7 年前
Cool, go back and tell the library authors to stop putting bullshit on native objects, or get them to put namespace prefixes when they do. Don’t blame TC39 for doing their jobs: not breaking existing content.<p>Blame the authors of the frameworks that force js into a terrible corner
TheCoelacanth大约 7 年前
If you do this they will just use some other ridiculous name like &#x27;squash&#x27;. Instead you need to check for the presence of any other TC39 feature and then if any are present, break if flatten isn&#x27;t present.
cpburns2009大约 7 年前
What is TC39? And what is smoosh?
评论 #16554781 未加载
评论 #16554685 未加载