Type checking records and variants in a natural extension of ML
D Rémy - Proceedings of the 16th ACM SIGPLAN-SIGACT …, 1989 - dl.acm.org
Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of …, 1989•dl.acm.org
Strongly typed languages with records may have inclusion rules so that records with more
fields can be used instead of records with less fields. But these rules lead to a global
treatment of record types as a special case. We solve this problem by giving an ordinary
status to records without any ad hoc assertions, replacing inclusion rules by extra
information in record types. With this encoding ML naturally extends its polymorphism to
records but any other host language will also transmit its power.
fields can be used instead of records with less fields. But these rules lead to a global
treatment of record types as a special case. We solve this problem by giving an ordinary
status to records without any ad hoc assertions, replacing inclusion rules by extra
information in record types. With this encoding ML naturally extends its polymorphism to
records but any other host language will also transmit its power.
Strongly typed languages with records may have inclusion rules so that records with more fields can be used instead of records with less fields. But these rules lead to a global treatment of record types as a special case. We solve this problem by giving an ordinary status to records without any ad hoc assertions, replacing inclusion rules by extra information in record types. With this encoding ML naturally extends its polymorphism to records but any other host language will also transmit its power.