|
|
|
|
|
by calebh
597 days ago
|
|
Functions that use a field called x but do not use a field called y can use the type {x=int, ... 'a}, right? The main difficulty I see with row polymorphism is with field shadowing. For example if you have a record with type {a=bool, x=int, c=unit}, then set the x field with type string instead, the new type should be {a=bool, x=string, c=unit}. I suppose if you only have syntax for creating a record with a literal, but do not have syntax for updating an existing record this is not a problem. |
|