Jump to content

Higher-order programming

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Tea2min (talk | contribs) at 07:33, 10 September 2010 (moved Higher order programming to Higher-order programming over redirect: Grammar, consistency with article text and with higher-order function, higher-order logic, higher-order modulation etc.). 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).