structural typing #1861
amitu
started this conversation in
Ideas & RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We currently support nominal types (eg if two records have compatible definition, we still do not accept substitution). Maybe we should support structural typing.
https://leptonic.solutions/blog/nominal-vs-structural-types/
If a record, R, as fields a, b and c, and someone expects a record E, with fields a and b (of compatible types), should in instance or R be accepted as instance of E?
Beta Was this translation helpful? Give feedback.
All reactions