Results 1 -
2 of
2
The Ins and Outs of Clean I/O
, 1995
"... Functional 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), functio ..."
Abstract
-
Cited by 39 (7 self)
- Add to MetaCart
Functional 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/0 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 stem 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 type...
Logical Specifications for Functional Programs
, 1993
"... We present a formal method of functional program development based on step-by-step transformation. In their most abstract form, specifications are essentially predicates that relate the result of the specified program to the free variables of that program. In their most concrete form, specifications ..."
Abstract
-
Cited by 9 (3 self)
- Add to MetaCart
We present a formal method of functional program development based on step-by-step transformation. In their most abstract form, specifications are essentially predicates that relate the result of the specified program to the free variables of that program. In their most concrete form, specifications are simply programs in a functional programming language. Development from abstract specifications to programs is calculational. Using logic in the specification language has many advantages. Importantly it allows nondeterministic specifications to be given, and thus does not force overspecification.

