Io: a new programming notation
暂无分享,去创建一个
I n t r o d u c t i o n Many years before the first computer was built, or the first programming notation designed, AlanTuring proved that all computers, and by extension, all programming notations, are capable of solving all the same types of problems (known as computable problems). What this means in practice is that we can have almost any programming notation we want. Programming notations have been designed to support existing, familiar notations, to be appropriate for a specific class of applications, to resemble English, and countless other purposes. The author set out to design the simplest practical programming notation possible. The result is the new programming notation Io, which is described in this paper. If the complexity of a programming notation is measured by the number of mechanisms, then clearly the simplest programming notation would consist of one single mechanism. A typical pitfall of such efforts is to design a notation that is mathematically self-contained, but with no facilities for input or output. In order to use such a notation in practice, it is necessary to forcibly graft input and output commands onto the notation. In order to avoid this, it is clear that the single mechanism of the programming notation should be able to support communication with the outside world. For this reason, Hoare's Communicating Sequential Processes were considered. However, Hoare's mechanisms are rather complex and awkward, so this was ultimately rejected. It is also required, of course, that the mechanism also be able to support ordinary computations. In addition, it would be nice if it were also possible to construct large systems out of smaller components, with a mechanism similar to a procedure call. All of these requirements were reconciled with a mechanism referred to in this paper as 'performing an action.' Output is accomplished by simply performing an action corresponding to an output device. Input is accomplished by specifying an action for the input device to p e r f o r m whenever it has an input value. Buffered and blocked communication can beaccomplished by adding a buffer or blocker in series with an action. Procedure call can be accomplished by specifying a 'return action' to be performed when the procedure is to return. It is a very simple mechanism, but can be assembled into patterns of any size and complexity. It is interesting that many of the important concepts in …
[1] Guy L. Steele,et al. LAMBDA: The Ultimate Declarative , 1976 .
[2] C. A. R. Hoare,et al. Communicating sequential processes , 1978, CACM.