Premium
Making form follow function: An exercise in functional programming style
Author(s) -
Fairbairn Jon
Publication year - 1987
Publication title -
software: practice and experience
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.437
H-Index - 70
eISSN - 1097-024X
pISSN - 0038-0644
DOI - 10.1002/spe.4380170603
Subject(s) - programmer , computer science , parsing , programming language , functional programming , presentation (obstetrics) , style (visual arts) , reading (process) , function (biology) , programming style , simple (philosophy) , human–computer interaction , natural language processing , linguistics , medicine , history , philosophy , archaeology , epistemology , evolutionary biology , biology , radiology
The combined use of user‐defined infix operators and higher order functions allows the programmer to invent new control structures tailored to a particular problem area. This paper is to suggest that such a combination has beneficial effects on the ease of both writing and reading programs, and hence can increase programmer productivity. As an example, a parser for a simple language is presented in this style. The compactness of this parser and its notational similarity to the BNF of the language are important advantages of the approach taken. It is hoped that the presentation will be palatable to people unfamiliar with the concepts of functional programming.