Referential transparency
Property of a computer software expression or subroutine that replacing it in the code with its evaluated result does not change the program's behavior
In analytic philosophy and computer science, referential transparency and referential opacity are properties of linguistic constructions, and by extension of languages. A linguistic construction is called referentially transparent when for any expression built from it, replacing a subexpression with another one that denotes the same value does not change the value of the expression.
Nº Q1754278 ★
Comum · Saberes
Referential transparency
Property of a computer software expression or subroutine that replacing it in the code with its evaluated result does not change the program's behavior
In analytic philosophy and computer science, referential transparency and referential opacity are properties of linguistic constructions, and by extension of languages. A linguistic construction is called referentially transparent when for any expression built from it, replacing a subexpression with another one that denotes the same value does not change the value of the expression.
Na Wikipédia
Texto em inglês Ainda não há artigo no seu idioma: trecho em inglês.
In analytic philosophy and computer science, referential transparency and referential opacity are properties of linguistic constructions, and by extension of languages. A linguistic construction is called referentially transparent when for any expression built from it, replacing a subexpression with another one that denotes the same value does not change the value of the expression. Otherwise, it is called referentially opaque. Each expression built from a referentially opaque linguistic construction states something about a subexpression, whereas each expression built from a referentially transparent linguistic construction states something not about a subexpression, meaning that the subexpressions are ‘transparent’ to the expression, acting merely as ‘references’ to something else. For example, the linguistic construction ‘_ was wise’ is referentially transparent (e.g., Socrates was wise is equivalent to The founder of Western philosophy was wise) but ‘_ said _’ is referentially opaque (e.g., Xenophon said ‘Socrates was wise’ is not equivalent to Xenophon said ‘The founder of Western philosophy was wise’). 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 languages and imperative languages 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, simplifying an algorithm, assisting in modifying code without breaking it, or optimizing code by means of memoization, common subexpression elimination, lazy evaluation, constant folding, or parallelization.
Texto: Wikipédia em inglês, CC BY-SA 4.0. ·
Cartas próximas
-
Transparência
Nº Q487623 ★★★
Sem ofertas
-
T
Transparência (comportamento)
Nº Q535347 ★★
Sem ofertas
-
Homoiconicity
Feature of a programming language that a program written in it can be manipulated as data using the language, and thus the program's internal representation can be inferred just by reading the program itself
Nº Q925488 ★
Sem ofertas
-
C
Construct validity
The degree to which a test measures what it claims, or purports, to be measuring
Nº Q1592163 ★
Sem ofertas
-
Idempotência
Propriedade de certas operações em matemática e ciência da computação, que podem ser aplicadas várias vezes sem alterar o resultado depois da primeira aplicação
Nº Q368988 ★★★★
Sem ofertas
-
Encapsulamento (informática)
Nº Q1305241 ★★★
Sem ofertas