今日、知人に「DuckTypingのメリットが今一ピンとこない」と言われて実際にコード書いて説明をしたのだけれども、せっかくなのでエントリにまとめる。 DuckTypingとは、動的言語の柔軟性を表現する概念で以下の格言に由来する。 "If it walks like a duck and quacks like a duck, it must be a duck" (もしもそれがアヒルのように歩き、アヒルのように鳴くのなら、それはアヒルである) つまり、アヒルのように振る舞うものは、実際にそれが何であろうとアヒルと見なすということになる。 もうちょっと言語よりな言い方をするのであれば、あるオブジェクトどのクラスに属するか考慮せず、どのようなインターフェースを持つかに注目するのがDuckTyping。 DuckTypingにおいて重要なことは「明示的な型チェックを避ける」と言うことで、どう
Why is SVG important? See SVG Overview for lots of good reasons that you should use SVG. SVG in the browser Despite SVG's status as a W3C recommendation, you'll need to make sure your browser can see it. W3C and SVG I've been involved in the SVG Interest Group, and have engaged in some babble about extending the spec to include new and wilder things. Here is another view of some of said babble.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く