-
23
pages
-
English
-
Documents
-
2013
Description
From“ResearchTopicsinFunctionalProgramming”ed. D.Turner,Addison-Wesley,1990,pp17–42. 1 Why Functional Programming Matters John Hughes The University, Glasgow Abstract As software becomes more and more complex, it is more and more important to structure it well. Well-structured software is easy to write and to debug, and provides a collection of modules that can be reused to reduce future programming costs. In this paper we show that two fea- tures of functional languages in particular, higher-order functions and lazy evaluation, can contribute significantly to modularity. As examples, we manipulate lists and trees, program several numerical algorithms, and im- plement the alpha-beta heuristic (an algorithm from Artificial Intelligence usedingame-playingprograms). Weconcludethatsincemodularityisthe key to successful programming, functional programming offers important advantages for software development. 1 Introduction This paper is an attempt to demonstrate to the larger community of (non- functional) programmers the significance of functional programming, and also to help functional programmers exploit its advantages to the full by making it clear what those advantages are. Functional programming is so called because its fundamental operation is the application of functions to arguments. A main program itself is written as a function that receives the program’s input as its argument and delivers the program’soutputasitsresult.
-
Publié par
-
Publié le
03 janvier 2013
-
Langue
English