Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
[B! api][programming] taninswのブックマーク
[go: Go Back, main page]

タグ

apiとprogrammingに関するtaninswのブックマーク (1)

  • API Design Matters http://queue.acm.org/detail.cfm?id=1255422 - 言語ゲーム

    http://d.hatena.ne.jp/oraccha/20090606/1244225100 経由で。 C# の Select() 関数についてひとしきり文句を書いた後に、実際良い API を作るコツを挙げている。 API は必要な機能を備えろ タイムアウトが 35 分以内で無ければならないとか、微妙な制限があってはならない。 API は不便を感じない限り出来るだけ小さく 例えば UNIX で wait, waitpid, wait3 wait4 と色々あるのはやり過ぎ。wait4 だけでよい。微妙に似た関数が沢山あって、一つの一般的な関数で他の奴が実装出来ない作りになってるのが最悪なパターン。 文脈なくして API なし キーから辞書を引いて文字列を返す関数を考える。キーに対応する文字列が無かった時、次のやり方があるだろう。 例外発生 null を返す 空文字列を返す どれが正しい

    API Design Matters http://queue.acm.org/detail.cfm?id=1255422 - 言語ゲーム
  • 1