If everything in a programming language is an expression, would it be refferentially transparent? -


i've ready somewhere, although not find after much searching, if guy create new programming language, completely referentially transparent expression.

some questions referential transparency indicate languages such ruby , perl have almost expression.

is possible/does exist?

if understand it, if programming language referentially transparent doesn't mean there no side effects @ all, , is possible have complete programming language without side effects?

and main question of title, if goal create referentially transparent programming language, go without saying expression?

if expression understand returns value, computation not expression must not return value, , referential transparency can safely removed. yes, referential transparency requires expression.

but, being expression not imply there can no side effects. example in c language there many expressions have side effects: take expression involving increment , decrement operators ++ , --.

there few programming languages no side effects. haskell used. uses clever trick called monads resolve situations require modification of state. example, print "hello" on screen, haskell doesn't modify existing universe 1 word appears on screen; creates , returns a new universe word on screen.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -