*** Welcome to piglix ***

Point-free programming


Tacit programming, also called point-free style, is a programming paradigm in which function definitions do not identify the arguments (or "points") on which they operate. Instead the definitions merely compose other functions, among which are combinators that manipulate the arguments. Tacit programming is of theoretical interest, because the strict use of composition results in programs that are well adapted for equational reasoning. It is also the natural style of certain programming languages, including APL and its derivatives, and concatenative languages such as Forth. Despite this base, the lack of argument naming gives point-free style a reputation of being unnecessarily obscure, hence the epithet "pointless style."

UNIX scripting uses the paradigm with pipes.

For example, a sequence of operations in an applicative language like the following:

...is written in point-free style as the composition of a sequence of functions, without parameters:

The key idea in tacit programming is to assist in operating at the appropriate level of abstraction. That is, to translate the natural transformation given by currying

into computer functions, where the left represents the uncurried form of a function and the right the curried. CA denotes the functionals from A to C, while A × B denotes the Cartesian product of A and B.

A simple example (in Haskell) is a program which takes a sum of a list. A programmer might define a sum recursively using a pointed (cf. value-level programming) method as:


...
Wikipedia

...