Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Referential transparency

Name: Anonymous 2009-07-28 15:02

A function is RT <=> it can be substituted by its value in any place of the code, right? So what's the difference between a function being referentially transparent and not having side effects? Can I get an example of a function that is one but isn't the other one?

Name: Anonymous 2009-07-28 17:36

>>8
Are you high? If a function is not altering its environment then it's not causing any effect on that environment, so how the fuck can reading a global variable be a side effect?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List