Communications of the ACM
PASCAL user manual and report
Rationale for the design of the Ada programming language
ACM SIGPLAN Notices - Rationale for the deisgn of the Ada programming language
Report on the programming language Euclid
ACM SIGPLAN Notices
Revised report on the algorithmic language ALGOL 68
Revised report on the algorithmic language ALGOL 68
Hi-index | 0.00 |
In programming practice it is often necessary to subsume records of different types under one common type such as an array, a file or a linked list. One has only to think of differently formatted records in a personnel file or of entries in a compiler's symbol table. Ever since PASCAL, records with variants constitute the most suitable language constructs available for this purpose.The problem of accessing record components within variants has not been satisfactorily solved by today's languages in two respects. In the first place uniqueness is demanded for the component names across all record variants, and this leads to an unnatural denotation in many cases. Secondly, there is no guarantee at compile time that access to a record variant will not result in a runtime error.In the present paper, ways of avoiding these problems are proposed.