Temporal Side Effects
Side effects due to the time taken for an operation to execute are usually ignored when discussing side effects and referential transparency. In most programs it is desirable to replace a long operation with an equivalent shorter one e.g. replacing (60 / 3 * 2)
with 40
. There are some cases, such as with hardware timing or testing, where operations are inserted specifically for their temporal side effects e.g. Sleep(5000)
or for(i=0; i < 10000; i++){}
. These instructions do not change state other than taking an amount of time to complete.
Read more about this topic: Side Effect (computer Science)
Famous quotes containing the words temporal, side and/or effects:
“Death is not an event in life: we do not live to experience death. If we take eternity to mean not infinite temporal duration but timelessness, then eternal life belongs to those who live in the present.”
—Ludwig Wittgenstein (18891951)
“I had an old axe which nobody claimed, with which by spells in winter days, on the sunny side of the house, I played about the stumps which I had got out of my bean-field. As my driver prophesied when I was plowing, they warmed me twice,once while I was splitting them, and again when they were on the fire, so that no fuel could give out more heat. As for the axe,... if it was dull, it was at least hung true.”
—Henry David Thoreau (18171862)
“The ultimate result of shielding men from the effects of folly, is to fill the world with fools.”
—Herbert Spencer (18201903)