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

make using A.B only for modules, using A: B only for single bindings #25306

Merged
merged 1 commit into from
Dec 29, 2017

Conversation

JeffBezanson
Copy link
Member

part of #8000

@JeffBezanson JeffBezanson added modules triage This should be discussed on a triage call and removed triage This should be discussed on a triage call labels Dec 28, 2017
@JeffBezanson JeffBezanson added this to the 1.0 milestone Dec 28, 2017
@Sacha0
Copy link
Member

Sacha0 commented Dec 28, 2017

Triage hearts.

@JeffBezanson JeffBezanson merged commit 2a56a37 into master Dec 29, 2017
@JeffBezanson JeffBezanson deleted the jb/simpler_using branch December 29, 2017 20:38
tpapp added a commit to tpapp/julia that referenced this pull request Nov 2, 2020
Main changes

Namespaces, export, import, using

- explain namespaces, qualified symbol names, and export lists
- consolidate examples where applicable
- fix examples which were outdated after JuliaLang#25306
- distribute the “Namespace miscellanea” section into parts in the appropriate sections
- break up the summary table and explain each case in detail with examples
- subsection on various strategies to handle symbol conflicts
- use “bring into the namespace/scope” instead of “import” in the text, as readers confuse it with `import`
- explicitly document what happens with multiple `using` / `import` statements
- add relevant style / best practices suggestions which are now widely used in the Julia ecosystem

Submodules

- discuss usage of `using ParentModule.SubModule` etc (relies on code loading)
- add submodule examples where order matters, fixes JuliaLang#38011 (also another example by @rdeits [from Discourse](https://discourse.julialang.org/t/problem-with-using-in-submodules/42321/2))
- mention that submodules do not “inherit” scope from parent

Misc incidental changes

- in the Methods chapter, add a note about adding methods to functions in other modules
- add a markdown id to the code-loading chapter

The “Module initialization and precompilation” section is left unchanged.
timholy added a commit that referenced this pull request Nov 5, 2020
* Reorganize the Modules chapter of the manual.

Main changes

Namespaces, export, import, using

- explain namespaces, qualified symbol names, and export lists
- consolidate examples where applicable
- fix examples which were outdated after #25306
- distribute the “Namespace miscellanea” section into parts in the appropriate sections
- break up the summary table and explain each case in detail with examples
- subsection on various strategies to handle symbol conflicts
- use “bring into the namespace/scope” instead of “import” in the text, as readers confuse it with `import`
- explicitly document what happens with multiple `using` / `import` statements
- add relevant style / best practices suggestions which are now widely used in the Julia ecosystem

Submodules

- discuss usage of `using ParentModule.SubModule` etc (relies on code loading)
- add submodule examples where order matters, fixes #38011 (also another example by @rdeits [from Discourse](https://discourse.julialang.org/t/problem-with-using-in-submodules/42321/2))
- mention that submodules do not “inherit” scope from parent

Misc incidental changes

- in the Methods chapter, add a note about adding methods to functions in other modules
- add a markdown id to the code-loading chapter

The “Module initialization and precompilation” section is left unchanged.

Co-authored-by: Tim Holy <[email protected]>
Co-authored-by: Simon Byrne <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants