2007-07-01から1日間の記事一覧

もうちょっと

あとはクラスとモジュール。クラスはまたad-hocな拡張が潜んでそうでやだなぁ。

<T> LinkedList<T> nil() { return new LinkedList<T>(); } void f() { List<T> list = nil(); } 一瞬、これ良いのかよ、と思うが、いつだったかのGenericsクイズと同じ理由で、Tは一意に決まるのだった。</t></t></t></t>

OCaml Language Sucks

Matzにっき経由。 Static type checking helps detect quite a few errors which is very good. Alas, this may lull you into a false sense of security ("it compiles, so it must work correctly"). というくだりとか、面白いこと言うなぁ、という感じ。…