Content deleted Content added
Minor clarifications (hopefully) |
m Open access bot: url-access updated in citation with #oabot. |
||
(2 intermediate revisions by 2 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 semantic equivalences among denotations of expressions, or on [[contextual equivalence]] of expressions themselves. That is, referential transparency depends on the semantics of the language. So, both [[declarative language]]s and [[imperative language]]s can have referentially transparent positions, referentially opaque positions, or (usually) both, according to the semantics they are given.
The importance of referentially transparent positions is that they allow the [[programmer]] and the [[compiler]] to reason about program behavior as a [[rewrite system]] at those positions. This can help in proving [[correctness (computer science)|correctness]], simplifying an [[algorithm]], assisting in modifying code without breaking it, or [[optimization (computer science)|optimizing]] code by means of [[memoization]], [[common subexpression elimination]], [[lazy evaluation]], or [[parallelization]].
Line 94:
* [[Liskov substitution principle]]
* [[Rewrite rule]]
==Notes==
{{notelist}}
== References ==
|