Question: Is there planned support for iterator in version 1.23?
まだ誰も着手していません。
評価
調査の方向性
この issue ではファイルもテストも指定されていません。まず既存の array 関数と、例に示されている expr.Func の統合を追跡し、その入力を Go 1.23 の iter.Seq と比較してください。完了には、スコープについての maintainer の判断と、受け入れられた場合はイテレータを基盤とする値のための具体的なテストが必要です。
索引モデルが issue の本文から書いたものです。
説明
Hi @antonmedv
Golang 1.23 will support the iter package and define the type Seq[V any] as an iterator. The expr package supports numerous array functions. I believe iterators will be widely used in many libraries in the future. Is there any plan for these array functions to support not only arrays but also iterators in version 1.23?
Use slice.Values as example
// Values is slices.Values inject by expr.Func
let v = Values([1, 2, 3]);
any(Values, { # > 1}) // [2, 3]
I understand this example is quite simple and not necessary (because we can directly use the array in any). However, please imagine that the iterator might not be iterating over an array.
Reference
https://tip.golang.org/doc/go1.23
https://pkg.go.dev/iter@master
- 主要言語
- Go
- スター
- 8k
- フォーク
- 535
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
expr-lang/expr のほかの issue
-
Docs: Built in functions shadow user variables対応中かも @sanmaxdev が 94 日前に担当しました。 オープンdocs needed
難易度 1/5 1〜3時間 初心者へのやさしさ 62/100
-
`in` operator on a struct doesn't respect `expr` tags対応中かも @akashchamp が 14 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
-
`find`, `findIndex`, `first` and `get` are type-checked as the element type where they return nil対応中かも @TastyHeadphones が 10 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
似ている issue
-
automation models
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Bug pulumi/pulumi
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
GoogleCloudPlatform/cluster-toolkit#6437 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
stripe/stripe-cli#2130 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kovidgoyal/kitty#10625 ·
メンテナーはふだん 1 日以内に返信