compiler: syntactic sugar for combine
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- compilers
調査の方向性
ファイルまたはテストのエントリーポイントは指定されていません。まずコンパイラの operation-expression の処理と既存の combine 実装を確認し、次に提案されている pipe 構文をリンク先の TC39 pipeline proposal と比較してください。完了条件は、有効な構文について合意し、チェーンを combine にコンパイルし、ブロック文の制限を定義することです。
索引モデルが issue の本文から書いたものです。
説明
One thing that's very hard to do in job writing is do muliple steps in one.
each is the usual usecase, where I want to do:
each($.data, get, fn, post)
Where what I really want in the each is a little pipeline which processes each item through multiple operations
I can do this today with promises:
each($.data, get.then(fn).then(post))
But it's ugly, the compiler creaks, and error handling isn't great
You can also use combine, which is cool but no-one knows about it:
each($.data, combine(get(), fn(), post()))
I'm just wondering if we can do some syntactic sugar for combine, like:
each($.data, [get, fn, post])
But we probably can't distinguish this piping sort of expression from an array.
What if we used something more like piping?
each($.data, get |> fn |> post)
each($.data, get | fn | post)
each($.data, get > fn > post)
each($.data, @[get,fn , post])
Not terribly neat or intuitive.
using a pipe is OK but the synax isn't reserved, so how would I catch it?
JS does have a proposal for a pipeline operator: https://github.com/tc39/proposal-pipeline-operator
So it's this then:
each($.data, get |> fn |> post)
The compiler detects the chain and compiles it to:
each($.data, combine(get, fn, post))
You cannot use the pipe operator inside a block statement. Use it only in place of an operation.
- 主要言語
- TypeScript
- スター
- 21
- フォーク
- 22
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 26
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenFn/kit のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
OpenFn/kit#1574 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
Worker: ignore sentry errors `Credential environment mismatch`再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
CLI
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
high priority
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
CI-CMG/deep-sea-corals-exb#84 · コメント 1 件 ·
-
Create/import wallet form shows raw "password must be at least 1 characters" instead of the translated message対応中かも @CapThunder19 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
joinmarket-webui/jam#1538 ·
メンテナーはふだん 1 日以内に返信
-
t0ggles
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nolimits4web/swiper#8240 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信