Author:
Achten Peter,Plasmeijer Rinus
Abstract
AbstractFunctional programming languages have banned assignment because of its undesirable properties. The reward of this rigorous decision is that functional programming languages are side-effect free. There is another side to the coin: because assignment plays a crucial role in Input/Output (I/O), functional languages have a hard time dealing with I/O. Functional programming languages have therefore often been stigmatised as inferior to imperative programming languages because they cannot deal with I/O very well. In this paper, we show that I/O can be incorporated in a functional programming language without loss of any of the generally accepted advantages of functional programming languages. This discussion is supported by an extensive account of the I/O system offered by the lazy, purely functional programming language Clean. Two aspects that are paramount in its I/O system make the approach novel with respect to other approaches. These aspects are the technique of explicit multiple environment passing, and the Event I/O framework to program Graphical User I/O in a highly structured and high-level way. Clean file I/O is as powerful and flexible as it is in common imperative languages (one can read, write, and seek directly in a file). Clean Event I/O provides programmers with a high-level framework to specify complex Graphical User I/O. It has been used to write applications such as a window-based text editor, an object based drawing program, a relational database, and a spreadsheet program. These graphical interactive programs are completely machine independent, but still obey the look-and-feel of the concrete window environment being used. The specifications are completely functional and make extensive use of uniqueness typing, higher-order functions, and algebraic data types. Efficient implementations are present on the Macintosh, Sun (X Windows under Open Look) and PC (OS/2).
Publisher
Cambridge University Press (CUP)
Reference34 articles.
1. Barendsen E. and Smetsers J. E. W. (1993a) Conventional and uniqueness typing in graph rewrite systems. Technical Report CSI-R9328, Computing Science Institute, Department of Informatics, University of Nijmegen.
2. Term graph rewriting
3. Groningen J. H. G. van , Nöcker E. G. J. M. H. and Smetsers J. E. W. (1991) Efficient heap management in the concrete ABC machine. In Glaser , Hartel (eds.) Proc. Third Int. Workshop on Implementation of Functional Languages on Parallel Architectures, Southampton, UK, Technical Report Series CSTR 91–07.
4. Single-threaded polymorphic lambda calculus
Cited by
33 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Hailstorm: A Statically-Typed, Purely Functional Language for IoT Applications;22nd International Symposium on Principles and Practice of Declarative Programming;2020-09-08
2. Kindly bent to free us;Proceedings of the ACM on Programming Languages;2020-08-02
3. Towards Energy-, Time- and Security-Aware Multi-core Coordination;Lecture Notes in Computer Science;2020
4. The Design and Formalization of Mezzo, a Permission-Based Programming Language;ACM Transactions on Programming Languages and Systems;2016-10-13
5. Towards the Layout of Things;Proceedings of the 28th Symposium on the Implementation and Application of Functional Programming Languages - IFL 2016;2016