Artigo Acesso aberto Revisado por pares

Type extensions

1988; Association for Computing Machinery; Volume: 10; Issue: 2 Linguagem: Inglês

10.1145/42190.46167

ISSN

1558-4593

Autores

Niklaus Wirth,

Tópico(s)

Software Testing and Debugging Techniques

Resumo

Software systems represent a hierarchy of modules. Client modules contain sets of procedures that extend the capabilities of imported modules. This concept of extension is here applied to data types. Extended types are related to their ancestor in terms of a hierarchy. Variables of an extended type are compatible with variables of the ancestor type. This scheme is expressed by three language constructs only: the declaration of extended record types, the type test, and the type guard. The facility of extended types, which closely resembles the class concept, is defined in rigorous and concise terms, and an efficient implementation is presented.

Referência(s)