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

clarify tip about untyped globals: const globals need no annotation #54379

Merged
merged 1 commit into from
May 6, 2024

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented May 6, 2024

The performance tip from #43671 by @simeonschaub

If a global is known to always be of the same type, the type should be annotated.

was a bit unclear to me, because it does not apply to const globals (whose type requires no annotation). This PR clarifies that point

@stevengj stevengj added the domain:docs This change adds or pertains to documentation label May 6, 2024
@StefanKarpinski StefanKarpinski merged commit 0d1d4ba into master May 6, 2024
9 checks passed
@StefanKarpinski StefanKarpinski deleted the stevengj-patch-6 branch May 6, 2024 21:04
lazarusA pushed a commit to lazarusA/julia that referenced this pull request Jul 12, 2024
…uliaLang#54379)

The performance tip from JuliaLang#43671 by @simeonschaub 

> If a global is known to always be of the same type, [the type should
be
annotated](https://docs.julialang.org/en/v1/manual/variables-and-scoping/#man-typed-globals).

was a bit unclear to me, because it does not apply to `const` globals
(whose type requires no annotation). This PR clarifies that point
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants