Nesting in Ada programs is for the birds
暂无分享,去创建一个
Given a data abstraction construct like the Ada package and in light of current thoughts on programming methodology, we feel that nesting is an anachronism. In this paper we propose a nest-free program style for Ada that eschews nested program units and declarations within blocks and instead heavily utilizes packages and context specifications as mechanisms for controlling visibility. We view this proposal as a first step toward the development of programming methods that exploit the novel language features available in Ada. Consideration of this proposal's ramifications for data flow, control flow, and overall program structure substantiates our contention that a tree structure is seldom a natural representation of a program and that nesting therefore generally interferes with program development and readability.
[1] Friedrich L. Bauer,et al. Revised report on the algorithm language ALGOL 60 , 1963, CACM.
[2] Stephen N. Zilles,et al. Specification techniques for data abstractions , 1975 .