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

Remove outdated wrong information about Module's qualified name access. #53251

Open
benibilme opened this issue Feb 8, 2024 · 1 comment
Open
Labels
docs This change adds or pertains to documentation

Comments

@benibilme
Copy link

Document of 1.10 has outdated information as discussed at Julia forum. Following code contradicts with the documentation.

julia> module A data=1 end
Main.A
julia> A.data=2
2
julia> A.data
2

Julia 1.10 module documentation Qualified Names Section

Within a module, a variable name can be “reserved” without assigning to it by declaring it as global x. This prevents name conflicts for globals initialized after load time. The syntax M.x = y does not work to assign a global in another module; global assignment is always module-local.

Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores
Environment:
  LD_PRELOAD = /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib/libstdc++.so
@vtjnash vtjnash added the docs This change adds or pertains to documentation label Feb 8, 2024
@vtjnash
Copy link
Member

vtjnash commented Feb 8, 2024

Seems to be similar to #53170, but in doc/src/manual/modules.md instead of doc/src/manual/variables-and-scoping.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

2 participants