Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fresh, freshen break referential transparency #78

Open
GoogleCodeExporter opened this issue Aug 9, 2015 · 1 comment
Open

fresh, freshen break referential transparency #78

GoogleCodeExporter opened this issue Aug 9, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

See following transcript:

prompt> let b = [fresh 'a', fresh 'a']

prompt> b

['x1043,'x1044] : [Symbol]
prompt> b

['x1043,'x1044] : [Symbol]
prompt> freshen b                     

(['x1049,'x1050],[('x1043,'x1049),('x1044,'x1050)]) : 
([Symbol],[(Symbol,Symbol)])

Same input results in different values --> referential transparency broken. 
This is not acceptable in a pure language. At least (fresh, freshen) should 
live in the IO monad.

Original issue reported on code.google.com by ggr...@gmail.com on 7 Dec 2010 at 12:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant