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

RFC: move ans and err variables to MainInclude module #48308

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

vtjnash
Copy link
Sponsor Member

@vtjnash vtjnash commented Jan 16, 2023

This hides them from names() unfortunately, but means we will not accidentally discard a variable from the user in Main, either because the import will fail or the assignment will fail. If we later have world-versioned bindings, this would also mean you could toggle (between worlds) between being module-local and a special import value.

Fix #43172
Fix #48299

base/client.jl Outdated Show resolved Hide resolved
This hides them from `names()` unfortunately, but means we will not
accidentally discard a variable from the user in Main, either because
the import will fail or the assignment will fail. If we later have
world-versioned bindings, this would also mean you could toggle (between
worlds) between being module-local and a special import value.

This also needed some improvements to docs, so that it would print
docstrings for unassigned globals without also simultaneously claiming
that it did not exist.

Fix JuliaLang#43172
Fix JuliaLang#48299
@vtjnash vtjnash merged commit 4d3607a into JuliaLang:master Feb 15, 2023
@vtjnash vtjnash deleted the jn/MainInclude-ans-err branch February 15, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

err variable trashes global Handling of err and ans global variables in REPL
4 participants