characteristics
traditional programming language concepts such as assignment, disappeared in functional programming languages. One of the most essential characteristics of the functional program, the function value is uniquely determined by the parameter values. Just use the same parameter values, for which different caller always get the same result. This property is called referential transparency , contribute to the modular. Functional programming languages have a strong ability to organize data structure, can be a data structure (such as an array) as a single value processing; can function as a parameter, the result may also be referred as a function of such defined functions Higher-order functions. These programs represented by the function expression concise, compact and easy to maintain.
in the past, this application of programming called programming. In 1977, J. Bacchus concept of functional programming. Generally considered list processing language (LISP) is the first functional programming language. However, LISP focus is the function applied to the object to produce a new object, and then rise as a function of time necessary. Functional programming Bacchus made, it is a reference to a function type a new function, when programming from the general rise in the object space to function space, which has a superior mathematical properties, helps to understand the program, reasoning and verification. Due to simplicity functional programming language skills and unique, it can be used to study traditional programming language semantics
use
. A method for determining an interpreter program defined as the semantics of the language being studied; Another method is studied to be written in the language program into its equivalent functional programs. In the field of artificial intelligence, it requires a complex algorithm to handle some complex (typically a symbol) data structure. LISP language successfully applied in this field, explains the unique advantages of functional programming. Bacchus analysis of the shortcomings of traditional programming languages that these defects are mainly due to the Neumann system architecture caused. He proposed functional programming (referred to as FP), from the traditional Neumann computer architecture, a new type of non-Neumann architecture for the backup. Some computers have new concepts, such as reduction machine, data flow machines, and computers designed for some kind of functional languages (such as FP) is designed for research and development. Both need to modern research on Neumann computer problem how to more effectively achieve functional programming language, also needed to adapt to the new computer architecture that language. There are many reasons
importance
functional programming of attention. First of all, due to the generation of the "software crisis", people attempt to explore new programming way out of this dilemma, and functional programming has a lot of unique. Second, the development of VLSI technology, in order to play the potential parallelism functional programming language provides the material basis. It is contemplated that some non-Neumann computer having characteristics such as a high degree of parallelism and the like will occur. With the development of hardware technology, software research methods, as well as expanding the scope of application of functional programming will be developed, and plays an important role in the new generation of computer systems.
Function Language
in functional languages for semantic basis λ- calculus, it is the basic mechanism of action function parameters, the basic function program items, a program is compiled recursive construction process functions. From a mathematical point of view, is a function from a domain (domain) to another domain (range) of the mapping, i.e. corresponding relationship function describes the two field elements. Therefore, the function language is a descriptive language, the definition given only solution to the problem needs without solving process and give specific details. The solution process is the language of the application itself through a series of rewriting rules to achieve. λ- calculus as a rewrite system meets the confluence of that item if a paradigm, a different rewrite policies will lead to the same paradigm, in order to ensure the uniqueness of the program solving.
From the above, function quite clear and concise language semantics and rewriting alleged operational semantics, which is particularly important to verify the correctness of the next program. The main advantages of functional languages are: (1) mathematics gracefulness, (2) simplicity, (3) referential transparency. It is because of these advantages, it is easy language program, and the program is easy to read and easy to maintain, the program is also very short and concise. In particular, the program has good algebraic properties, easy to program and verify the correctness of the interpretation. Another major advantage of referential transparency is brought inherently program parallelism.
The first function of language countable Lisp, McCarthy was founded in 1960, its initial motivation for considering the anonymous function, said the development of a process for algebraic language Al.
It should be said in Lisp influence the development of early Bu little calculus, but because Lisp itself a very good math and beautiful nature, its development function of language had a significant impact. Lisp is still the most popular functional languages, mainly for programming intelligent systems. For efficiency reasons, it has now become a kind of impure language functions have side effects.