Typing record concatenation for freeReportar como inadecuado

Typing record concatenation for free - Descarga este documento en PDF. Documentación en PDF para descargar gratis. Disponible también para leer online.

1 FORMEL INRIA Rocquencourt

Abstract : We show that any functional language with record extension pocesses record concatenation for free. We exhibit a translation from the latter into the former. We obtain a type system for a language with record concatenation by composing the translation with type-checking in a language with record extension. We apply this method to a version of ML with record extension and obtain an extension of ML with either asymmetric or symmetric concatenation. The latter extension is simple, flexible and has a very efficient type inference algorithm in practice. Concatenation together with removal of fields needs one more construct than extension of records. It can be added to the version of ML with record extension. However, many typed languages with record cannot type such a construct. The method still applies to them, producing type systems for record concatenation without removal of fields. Object systems also benefit of the encoding which shows that multiple inheritance does not actually require the concatenation of records but only their extension.

Autor: Didier Remy -

Fuente: https://hal.archives-ouvertes.fr/


Documentos relacionados