トップ «前の日記(2014-06-17) 最新 次の日記(2014-06-20)» 編集

Route 477



2014-06-18

[types] Structual Subtyping(構造的部分型)とRow Polymorphism(列多相)ってどう違うの

Well, subtyping and type inference just don't mix. Doing type inference with row polymorphic records is much easier.

結果的には同じだけど、型推論と構造的部分型を組み合わせるのは大変なので、単に自作言語にrecordを入れたいだけなら列多相を使った方が楽だよ、という感じか。