Jump to content

Higher-order programming

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Citation bot (talk | contribs) at 12:11, 21 September 2021 (Add: citeseerx. | Use this bot. Report bugs. | Suggested by Abductive | Category:Programming paradigms | #UCB_Category 36/113). 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 computer programming that uses software components, like functions, modules or objects, as values. It is usually instantiated with, or borrowed from, models of computation such as 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 interpreting). This style of programming is mostly used in functional programming, but it can also be very useful in object-oriented programming. A slightly different interpretation of higher-order programming in the context of object-oriented programming are higher order messages, which let messages have other messages as arguments, rather than functions.

Prominent examples of languages supporting this are Wolfram Language, C#, Java, ECMAScript (ActionScript, JavaScript, JScript), F#, Haskell, Lisp (Common Lisp, Scheme, Clojure, others), Lua, Oz, Perl, PHP, Prolog,[1] Python, Ruby, Smalltalk, Scala, ML, and Erlang.

See also

References

  1. ^ Naish, Lee (1996). Higher-order logic programming in Prolog (Report). Department of Computer Science, University of Melbourne. CiteSeerX 10.1.1.35.4505. Retrieved 2010-11-02.