next up previous
Next: 1.1 Criteria Up: Functional Languages and Introductory Previous: Functional Languages and Introductory

1 Introduction

The choice of which programming language to use in introductory computer science courses borders on being a religious issue in which divides computer science departments over issues involving what are believed to be practical skills required by industry and the requirements of pedagogy. More often, in the past, industrial requirements have prevailed as witnessed by the use of languages such as Cobol, FORTRAN, PL/I and more recently C and C++. Languages have been developed which have, in part, focused on education, i.e. Pascal, Modula, etc., but these languages have not become a dominant force in the commercial production of software. At least one computer scientist [Dij 89] has advocated the use of an unimplemented programming language to teach computer science which necessarily forces programming instruction to be purely an intellectual activity. Recent growth in Internet activity has provided stimulus for the development of software systems which may be executed on a variety of different hardware/software environments. One of these, Java, which uses an abstract Java virtual machine to host the software is remarkably similar in overall concept to the Pascal P machine. Because of Internet popularity, Java is now proposed by some as a suitable vehicle for teaching computer science. Trends or fads come and go in computer science education just as in other fields.

In each of the programming languages mentioned above, it is not clear that the choice to use the language for computer science instruction is made primarily for pedagogical reasons. In Section 1.1, criteria are given which are based on requirements of computer science instruction, particularly use of programming notation in an expository fashion in the teaching of introductory computer science.

Functional languages provide a computational environment where functions are applied to arguments producing results. Once an item is created in memory it is never altered. Function application occurs without side effects. Algorithms involve sequences of function applications (functional composition). Most functional language environments automatically reclaim (garbage collection) items which are no longer needed.

Imperative languages use a state model of computation wherein procedures modify the state of items stored in memory as a computation proceeds from beginning to end.

Functional languages provide somewhat different view of program design which can be useful in the teaching of introductory computer science topics.

In the following sections, programming examples are given in the Scheme [Har 94,Man 95,Spr 89] and J [Ive 95] programming languages. J is a pure functional language, however, Scheme is not. A subset of Scheme, which omits any Scheme function which mutates an existent Scheme item, is used for the examples in this paper.

The choice of programming language used to teach computer science topics has been widely discussed in the computer science education literature. In particular, [Kon 74,Kon 94,Rie 93,How 94,How 95,How 96,How 97] advocate the use of functional languages, such as J and Scheme, in the teaching of many introductory computer science topics. This paper considers the use of Scheme or J when teaching introductory computer science.



Subsections
next up previous
Next: 1.1 Criteria Up: Functional Languages and Introductory Previous: Functional Languages and Introductory
2002-11-26