913
views
0
recommends
+1 Recommend
1 collections
    4
    shares

      Celebrating 65 years of The Computer Journal - free-to-read perspectives - bcs.org/tcj65

      scite_
       
      • Record: found
      • Abstract: found
      • Conference Proceedings: found
      Is Open Access

      Experiences with Clean I/O

      proceedings-article
      Proceedings of the 1995 Glasgow Workshop on Functional Programming (FP)
      Functional Programming
      10-12 July 1995
      Bookmark

            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.

            Content

            Author and article information

            Contributors
            Conference
            July 1995
            July 1995
            : 1-11
            Affiliations
            [0001]Department of Computing Science and Mathematics, University of Stirling

            Stirling, Scotland
            Article
            10.14236/ewic/FP1995.16
            38fb3eb4-fa00-4793-aefe-7e9c8c221a7e
            © Simon B Jones. Published by BCS Learning and Development Ltd. Proceedings of the 1995 Glasgow Workshop on Functional Programming, Ullapool, Scotland

            This work is licensed under a Creative Commons Attribution 4.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/

            Proceedings of the 1995 Glasgow Workshop on Functional Programming
            FP
            Ullapool, Scotland
            10-12 July 1995
            Electronic Workshops in Computing (eWiC)
            Functional Programming
            History
            Product

            1477-9358 BCS Learning & Development

            Self URI (article page): https://www.scienceopen.com/hosted-document?doi=10.14236/ewic/FP1995.16
            Self URI (journal page): https://ewic.bcs.org/
            Categories
            Electronic Workshops in Computing

            Applied computer science,Computer science,Security & Cryptology,Graphics & Multimedia design,General computer science,Human-computer-interaction

            Comments

            Comment on this article