Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

joinにまつわる名前の問題 #15

Closed
akanehara opened this issue Feb 19, 2013 · 1 comment
Closed

joinにまつわる名前の問題 #15

akanehara opened this issue Feb 19, 2013 · 1 comment

Comments

@akanehara
Copy link
Owner

Ginqがイテレータのkeyを意識していなかった頃のjoinの引数は

join($outerKeySelector, $innerKeySelector, $joinSelector)

で、keyという言葉がは結合キー「だけ」を指していた。

ところが、現在は反復子のキーにも key という言葉を使っているために

join(
    $outerKeySelector, $innerKeySelector,
    $valueJoinSelector, $keyJoinSelector
)

となってしまっており、どれが結合キーを表すのかとてもわかりづらい。

  • 2値をとるセレクタを JoinSelector と呼ぶことの妥当性
  • 結合キーセレクタを表す変数名 outerKeySelector, innerKeySelector の妥当性

これらについて考えたい。

@akanehara
Copy link
Owner Author

join や groupBy, orderBy を通じて
比較キーを outerCompareKeySelector outerCompareKeySelector
結果ペアを resultValueSelector resultKeySelector
と一貫して名付ける。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant