Tacit programming: Difference between revisions

Content deleted Content added
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
citation needed; move Python example to examples
Line 4:
[[Unix]] [[Command-line interface|scripting]] uses the paradigm with [[Pipeline (Unix)|pipes]].
 
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]]{{fact|date=June 2020}}
For example, a sequence of operations such as the following [[Python (programming language)|Python]] code:
:<math> \hom(A \times B, C) \cong \hom(B, C^A)</math>
 
into computer functions, where the left represents the uncurried form of a function and the right the curried. ''C<sup>A</sup>'' denotes the functionals from ''A'' to ''C'' (see also [[exponential object]]), while ''A'' × ''B'' denotes the [[Cartesian product]] of ''A'' and ''B''.{{fact|date=June 2020}}
 
==Examples==
 
===Python ===
Tacit programming can be illustrated with the following [[Python (programming language)|Python]] code. A sequence of operations such as the following:
<syntaxhighlight lang="python">
def example(x):
Line 20 ⟶ 28:
example = compose(baz, bar, foo)
</syntaxhighlight>
 
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]]
:<math> \hom(A \times B, C) \cong \hom(B, C^A)</math>
 
into computer functions, where the left represents the uncurried form of a function and the right the curried. ''C<sup>A</sup>'' denotes the functionals from ''A'' to ''C'' (see also [[exponential object]]), while ''A'' × ''B'' denotes the [[Cartesian product]] of ''A'' and ''B''.
 
==Examples==
 
===Functional programming===