Jump to content

Higher-order programming

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Paddy3118 (talk | contribs) at 21:24, 26 November 2009 (Undid revision 328096051 (It confuses more than it explains).). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Higher-order programming is a style of programming that exploits the theoretical ability to use functions as values; it is usually instantiated with, or borrowed from, models of computation like the lambda calculus which make heavy use of higher-order functions.

For example, in higher-order programming, one can pass functions as arguments to other functions and functions can be the return value of other functions (such as in macros or for interpretation). This style of programming is mostly used in functional programming, but it can also be very useful in 'regular' object-oriented programming. Prominent examples of languages supporting this are Perl, Oz , Python, Ruby, Smalltalk, PHP, ActionScript, JavaScript, Lua, all the Lisp programming languages (such as Scheme), Haskell and C (via function pointers).