Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/2227330.2227346guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Experiences with clean I/O

Published: 10 July 1995 Publication History

Abstract

The Clean system is a powerful functional programming tool. It contains experiments in a number of different areas of functional language design. In particular, it has a novel proposal for the organization of input and output, and contains impressive libraries of facilities for programming graphical user interfaces.
Clean I/O is based on collections of operations that act to cause side effects on multiple explicit abstract values representing physical I/O entities, such as files and graphical interfaces. A system of unique types is used to ensure that these values are individually single threaded through the program; and the side effecting I/O operations are therefore well controlled. This approach is distinct from monadic I/O, which is being widely adopted; monadic I/O schemes are based on a single, implicit environment, and guarantee that this is single threaded.
In this paper we will show that the Clean and monadic approaches to I/O merge nicely. The functionality provided by the Clean and its I/O libraries allows libraries for monadic I/O to be implemented. The paper presents an implementation of a basic I/O monad library in Clean that can serve for future development. In itself, the fact that the monadic approach can be implemented in Clean is unsurprising. However, some interesting technical difficulties arose during implementation of the monad; these and their solutions are discussed. The opportunity to express programs using the implicit environments of monadic I/O allows us to simplify Clean programs by removing some of the spaghetti, whilst retaining the generality of the explicit environments where it is the most appropriate approach.

References

[1]
Peter Achten and Rinus Plasmeijer. The ins and outs of Clean I/O. Journal of Functional Programming, 5:81-110, 1995.
[2]
Simon B Jones and Andrew F Sinclair. Functional programming and operating systems. The Computer Journal, 32(2):162-174, April 1989.
[3]
Simon Peyton Jones and Philip Wadler. Imperative functional programming. In Proceedings of the 20th ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 71-84. ACM, January 1993.
[4]
Rinus Plasmeijer and Marko van Eekelen. Functional Programming and Parallel Graph Rewriting. Addison-Wesley, 1993.
[5]
Philip Wadler. The essence of functional programming. In Proceedings of the 19th Annual Symposium on Principles of Programming Languages, January 1992.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
FP'95: Proceedings of the 1995 international conference on Functional Programming
July 1995
177 pages

Publisher

BCS Learning & Development Ltd.

Swindon, United Kingdom

Publication History

Published: 10 July 1995

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media