|
Functional programming, in computer studies, provides a somewhat different way to look at computing than normal programming, which concentrates on the task to be solved. It is the method of programming which is closest to being mathematical, and thus lends itself to such applications as proving that a given program will perform the job it was intended to do, fulfilling its specifications. Essentially, a functional programming language will contain some basic definitions of functions (such as addition and multiplication), and the computer evaluates expressions containing these and additional functions defined by the programmer. A program consists of a list of definitions and then expressions to be evaluated.
The importance of functional programming is principally that by reducing a computer program to its mathematical essentials it is possible to tell very easily whether a program will run without producing errors (in most languages, it takes many times as long to find and correct errors than it does to write the program in the first place) and whether it meets its specifications. SMcL |
|