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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

TypeScript support for ES Next pipeline operator

42 点作者 valera_rozuvan超过 6 年前

6 条评论

viksit超过 6 年前
Greenspuns tenth rule: “Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.”<p>I’ve always wanted a clojure style thread operator [1] in other languages :)<p>[1] <a href="https:&#x2F;&#x2F;clojure.org&#x2F;guides&#x2F;threading_macros" rel="nofollow">https:&#x2F;&#x2F;clojure.org&#x2F;guides&#x2F;threading_macros</a>
评论 #18041990 未加载
评论 #18045313 未加载
maxfurman超过 6 年前
What happened to the bind operator (::)? I do miss threading macros from Clojure but I don&#x27;t see them as solving a real problem in the javascript language. A shortcut for binding `this`, on the other hand, would have saved me a lot of time wondering why my React component methods weren&#x27;t working correctly.
评论 #18041979 未加载
评论 #18041918 未加载
评论 #18043872 未加载
alvis超过 6 年前
Note that the proposal for a pipeline operator is still in its early day. In fact, there are two proposals (<a href="https:&#x2F;&#x2F;babeljs.io&#x2F;blog&#x2F;2018&#x2F;07&#x2F;19&#x2F;whats-happening-with-the-pipeline-proposal" rel="nofollow">https:&#x2F;&#x2F;babeljs.io&#x2F;blog&#x2F;2018&#x2F;07&#x2F;19&#x2F;whats-happening-with-the-...</a>) and so far there&#x27;s no clear winner. Seems like there&#x27;s still a long way to go.<p>Anyway, which style do you prefer?
评论 #18041847 未加载
dvlsg超过 6 年前
Don&#x27;t they still have to wait for the spec to finalize &#x2F; hit stage 3?<p>Don&#x27;t get me wrong, I&#x27;m super excited for this functionality because I love it in languages like F# and Elixir, but it looks like the pipe proposal is still stage 1.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposals&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tc39&#x2F;proposals&#x2F;blob&#x2F;master&#x2F;README.md</a>
评论 #18041745 未加载
评论 #18041758 未加载
评论 #18041739 未加载
skybrian超过 6 年前
It seems unfortunate that JavaScript is evolving so quickly these days. There is more syntax than anyone who isn&#x27;t a full-time web developer will be able to remember.
评论 #18041955 未加载
AndrewDucker超过 6 年前
I was hoping we&#x27;d get something like PowerShell pipelines, which work on iterators, passing each item through as it&#x27;s generated.<p>Those are incredibly powerful, and as a lot to the language, whereas this just seems like fairly simple syntactic sugar.