Referential transparency
Referential transparency is a property of parts of computer programs. An
expression is said to be referentially transparent if it can be replaced with its
value without changing the program (in other words, yielding a program that has the same effects and output on the same input). The opposite term is referentially opaque. Since referential transparency involves the concept of determinacy (producing the same result for each input), all referentially transparent functions are
determinate.
See more at Wikipedia.org...
Transparence référentielle
La transparence référentielle est une propriété des langages de programmation qui fait que chaque expression peut être remplacée par son résultat sans changer le comportement du programme.
Pour la suite, voir Wikipédia.org…
Referenzielle Transparenz
Die Referenzielle Transparenz ist eine wichtige Eigenschaft des
deklarativen Programmierparadigmas. Sie besagt, dass der Wert eines Ausdrucks nur von seiner Umgebung abhängt und nicht vom Zeitpunkt seiner Auswertung.In der Mathematik gilt, dass ein und dieselbe Variable an verschiedenen Stellen ihres Geltungsbereichs immer den gleichen Wert hat. Dies gilt in
imperativen Programmiersprachen nicht, da die
Programmsemantik (z. B. Endergebnis) von einem impliziten Zustand (z. B. Speicherinhalt) abhängt.x = x + 1
Mehr unter Wikipedia.org...
Чистота языка программирования
Чистота́ (в отношении языка программирования) — отсутствие
побочных эффектов и
детерминированность. Язык программирования является чистым в том случае, если все функции в программах этого языка являются
чистыми.Программы написанные на чистых языках программирования проще
отлаживать,
верифицировать, обнаруживать ошибки, которые не удалось обнаружить с помощью
тестирования. Программы на чистом языке программирования проще переписывать избегая внесения ошибок. В то же время, сам процесс планирования программы с расчётом на чистоту сложнее.
Продолжение на Wikipedia.οrg...
referential transparency
referential transparency
an expression e is referentially transparent if any subexpression and its value (the result of evaluating it) can be interchanged without changing the value of e. this is not the case if the value of an expression depends on global state which can change value. the most common example of changing global state is assignment to a global variable. for example, if y is a global variable in: