Should `localeCompare` return in `Effect`?
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 領域
- api
調査の方向性
Review Data.String.Common.localeCompare and the linked MDN localeCompare behavior, then compare them with the planned Intl bindings that accept a Locale argument. The issue is done only after the FFI/effect decision and intended API behavior are resolved; no file or test is named in the report.
索引モデルが issue の本文から書いたものです。
説明
localeCompare can return different output depending on locale. Example borrowed from MDN:
console.log("ä".localeCompare("z", "de")); // a negative value: in German, ä sorts before z
console.log("ä".localeCompare("z", "sv")); // a positive value: in Swedish, ä sorts after z
The FFI for Data.String.Common.localeCompare uses the system default locale, so Data.String.Common.localeCompare "ä" "z" could be LT or GT depending on if it's run in Germany or Sweden, for example.
It seems unlikely (maybe even impossible? I'm not sure) for a system's locale to change over the lifetime of a program, so maybe that is enough to consider localeCompare observationally pure?
I'm mostly just curious about the intuition for what makes FFI code "effect"-ful, as I have a library of bindings for the Intl object and I was planning on adding to it a localeCompare that accepted the Locale argument as well.
- 主要言語
- PureScript
- スター
- 57
- フォーク
- 76
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
purescript/purescript-strings のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
purescript/purescript-strings#176 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
purescript/purescript-strings#171 · コメント 3 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
purescript/purescript-strings#170 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
purescript/purescript-strings#167 · コメント 4 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
purescript/purescript-strings#164 · コメント 2 件 ·
purescript/purescript-strings の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
use-agent-os/agent-os#3276 ·
-
good first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
area/sessions comp/agent P2 tool/skills type/perf
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NousResearch/hermes-agent#117788 ·