-
Notifications
You must be signed in to change notification settings - Fork 53
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
Don't show memory references in pretty-printed values #350
Comments
Hey @byorgey, do you think this would be possible generally or at least in common cases? Maybe we could keep the |
Hmm, good question!
Totally agree on this point. But off the top of my head I am not sure how difficult this would be. Intuitively it strikes me as one of those things that seems reasonable on the surface but hides some weird difficulties. I will give it some more thought and see if I can come up with a reasonable proposal. |
So some of this is due to the way closures get printed. When we evaluate a This would not eliminate memory references from ever showing up in pretty-printed terms (I think that is a tricky problem in general), but it would solve the I think the way to do this would be to add a |
So in order to solve #7 I think we are definitely going to have to save definitions somewhere. So every time a |
#1949 pretty much solved this. The given examples no longer generate memory references:
The only thing that could still be improved is what I discussed in a comment above: in the second example above, |
Currently, we store sub-results as "memory cells" printed as
@1
. Ideally, players would never see them and there would always be a way to print a value so that it could be reconstructed.Consider for example simple
let
, which is printed fine:But recursive let is printed with the memory cell:
Similarly using other definitions uses memory cells:
We could keep the original definitions and their dependencies and print those so that after overwriting
f
we could still printg
:.sw
file #7The text was updated successfully, but these errors were encountered: