BookRags.com Literature Guides Literature
Guides
Criticism & Essays Criticism &
Essays
Questions & Answers Questions &
Answers
Lesson Plans Lesson
Plans
My Bibliography Periodic Table U.S. Presidents Shakespeare Sonnet Shake-Up
Research Anything:        
History | Encyclopedias | Films | News | Create a Bibliography | More... Login | Register | Help

Not What You Meant?  There are 10 definitions for Functional.

Functional Programming

Print-Friendly  Order the PDF version  Order the RTF version
About 2 pages (473 words)
Functional programming Summary

Bookmark and Share Know this topic well? Help others and get FREE products!

Functional Programming

Functional programming, also known as applicative programming, is a form of programming in which functions can be manipulated in arbitrary ways. The evaluation of expressions is emphasized, rather than the execution of commands. Using the various functions forms the expressions. Programming languages such as XML, Perl, XML and Python incorporate some functional programming-inspired features.

Another way of describing functional programming, in computer terminology, is that it is a declarative language--a language that specifies what ought to be done, rather than in what order things are to occur. This descriptive programming is different in approach from the more normal imperative programming. Instead of giving commands to the computer, objects are described. Each object is either a "primitive" object--like a number--or is created by applying some function to another object.

The declarative nature of functional programming means that the compiler, which translates source code into object code, has some freedom as to how to evaluate a program. Three evaluative strategies can be used. These are termed strict, eager and lazy. In strict evaluation, everything that the programmer has written is evaluated, and is done so in a well-defined order. This is similar to the way ordinary programming languages operate. Examples of strict functional programming languages are Scheme and ML. Eager also evaluates everything the programmer has written, but in no particular order. Example languages are Id and pH. Finally, and in contrast to the previous two strategies, lazy evaluates only what is needed to produce a functional result. The best example of lazy evaluation is the Haskell programming language. The biggest obstacle to the popularity and use of the lazy evaluative strategy has been determining what does and does not need to be done to produce the functional result, a process that may be time-consuming. Current technological improvements are reducing the time required by compilers to swiftly sort out the necessary from the unnecessary.

Functional programming offers a number of potential advantages over other programming languages. First, because the different evaluation strategies allow for computation in any order, the use of multiple processors allows computations to be performed simultaneously. In computing terminology, this is described as parallel operation. Second, the focus on function-oriented expressions rather the commands allows compilers to analyze and transform information in complex ways. This greater degree of analytical depth can extract more meaning from the information. Third, the executable parts of programs can be described, tested and modified if necessary more easily and quickly than with imperative programs. Finally, functional languages are relatively easy for a programmer to write code in, especially when the data is more abstract.

While offering a number of powerful features, relative to conventional programming, the abstract nature of functional programming requires considerable effort on the part of a programmer to master these potentials. Nontheless, the potential advantages combined with research advancements could propel functional programming more into the mainstream.

This is the complete article, containing 473 words (approx. 2 pages at 300 words per page).

More Information
  • View Functional Programming Study Pack
  • 10 Alternative Definitions
  • Search Results for "Functional Programming"
  • Add This to Your Bibliography
  • More Products on This Subject
    Functional Programming Languages
    Functional, or applicative, programming languages are based on the application of mathematical func... more

    Functional Change
    n. A general term for any historical change in which the phonological status of a segment or a feat... more


     
    Ask any question on Functional programming and get it answered FAST!
    Answer questions in BookRags Q&A and earn points toward
    discounted or even FREE Study Guides and other BookRags products!
    Learn more about BookRags Q&A
    Copyrights
    Functional Programming from World of Computer Science. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.

    Join BookRagslearn moreJoin BookRags




    About BookRags | Customer Service | Report an Error | Terms of Use | Privacy Policy