Content deleted Content added
m →Referential transparency: {{math}} |
m Open access bot: url-access updated in citation with #oabot. |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 2:
{{About|referential transparency in programming language theory|its use in linguistics and philosophy|Opaque context}}
In [[analytic philosophy]] and [[computer science]], '''referential transparency''' and '''referential opacity''' are properties of linguistic constructions,
Referential transparency, in programming languages, depends on
The importance of
== History ==
The concept originated in [[Alfred North Whitehead]] and [[Bertrand Russell]]'s ''[[Principia Mathematica]]'' (1910–1913):<ref name="whitehead1927" />
<blockquote>
A proposition as the vehicle
Of course it is possible to make statements about the particular fact “Socrates is Greek.” We may say how many centimetres long it is; we may say it is black; and so on. But these are not the statements that a philosopher or logician is tempted to make.
Line 40:
A ''position'' is defined by a sequence of natural numbers. The empty sequence is denoted by ε and the sequence constructor by ‘.’.
''Example.'' — Position 2.1 in the expression {{math|(+ (
Expression {{mvar|e}} ''with'' expression {{mvar|e′}} ''inserted at'' position {{mvar|p}} is denoted by {{math|''e''[''e′''/''p'']}} and defined by
Line 46:
: {{math|''e''[''e′''/''i''.''p''] ≡ <Ω ''e''<sub>1</sub> … ''e''<sub>''i''</sub>[''e′''/''p''] … ''e''<sub>''n''</sub>>}} if {{math|''e'' ≡ <Ω ''e''<sub>1</sub> … ''e''<sub>''i''</sub> … ''e''<sub>''n''</sub>>}} else undefined, for all operators {{math|Ω}} and expressions {{math|{{var|e}}<sub>1</sub>, …, {{var|e}}<sub>{{var|n}}</sub>}}.
''Example.'' — If {{math|''e'' ≡ (+ (
Position {{mvar|p}} is ''purely referential'' in expression {{mvar|e}} is defined by
Line 94:
* [[Liskov substitution principle]]
* [[Rewrite rule]]
==Notes==
{{notelist}}
== References ==
|