Best formalism to define the interface
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- julia
調査の方向性
まず、この issue で提案されているインターフェースの選択肢と、参照されている Graphs.jl の pull request #262 を確認してください。メソッドレス関数のアプローチとデフォルトエラーのアプローチ、およびリンクされている Interfaces.jl と InterfaceSpecs.jl の選択肢を比較してください。maintainer が新しい API の形式について合意し、文書化すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When we define the new API, there will be abstract types with some methods that must be implemented. In base Julia, I see two main ways of specifying this (as in, defining the function name, possibly with a generic docstring):
julia> function myfunc1 end
myfunc1 (generic function with 0 methods)
julia> myfunc2(args...) = error("Not implemented")
myfunc2 (generic function with 1 method)
julia> myfunc1(1)
ERROR: MethodError: no method matching myfunc1(::Int64)
Stacktrace:
[1] top-level scope
@ REPL[4]:1
julia> myfunc2(1)
ERROR: Not implemented
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] myfunc2(args::Int64)
@ Main ./REPL[2]:1
[3] top-level scope
@ REPL[5]:1
I believe a methodless function is better than a single method throwing an error by default. The end result is nearly the same in terms of user experience, but I find the first error clearer because it directly tells you what to implement. @simonschoelly what do you think?
Of course we could also consider more advanced options like Interfaces.jl or InterfaceSpecs.jl but maybe it's a bit overkill?
- 主要言語
- Julia
- スター
- 11
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
JuliaGraphs/GraphsBase.jl のほかの issue
-
Constructors for 2.0オープンquestion
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaGraphs/GraphsBase.jl#34 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
JuliaGraphs/GraphsBase.jl#28 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaGraphs/GraphsBase.jl#27 · コメント 1 件 · リアクション 1 件 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 22/100
JuliaGraphs/GraphsBase.jl#26 · コメント 6 件 · リアクション 2 件 ·
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
JuliaGraphs/GraphsBase.jl#25 · コメント 3 件 · リアクション 1 件 ·
JuliaGraphs/GraphsBase.jl の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
oxfordcontrol/COSMO.jl#211 ·
-
documentation
難易度 2/5 半日 初心者へのやさしさ 65/100
メンテナーはふだん 6 日以内に返信
-
Out-of-place JLArray/GPU problem with VectorContinuousCallback scalar-indexes (callback cache built with CPU zeros)対応中かも @ChrisRackauckas-Claude が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
SciML/OrdinaryDiffEq.jl#4813 ·
メンテナーはふだん 1 日以内に返信
-
ARKODE: callbacks that modify `u` throw MethodError on reinit対応中かも @devmotion が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
SciML/Sundials.jl#575 ·